diff --git a/resources/i18n/en-GB.edn b/resources/i18n/en-GB.edn
index 442f097..29dca4f 100644
--- a/resources/i18n/en-GB.edn
+++ b/resources/i18n/en-GB.edn
@@ -81,6 +81,8 @@
;; Text introducing the link to an uploaded file
:file-upload-prompt "File to upload" ;; prompt string for the file upload widget
:file-upload-title "Upload a file" ;; title for the file upload page
+ :fix-and-restart "After fixing these problems you must restart Smeagol"
+ ;; used in sanity check report
:is-admin-prompt "Is administrator?"
:here "here" ;; used in sanity check report
:history-link "History" ;; text of the history link on the content frame
diff --git a/resources/templates/edit.html b/resources/templates/edit.html
index 840491d..9b2023f 100644
--- a/resources/templates/edit.html
+++ b/resources/templates/edit.html
@@ -4,8 +4,8 @@
{% else %}
- {% style "vendor/simplemde/dist/simplemde.min.css" %}
- {% script "vendor/simplemde/dist/simplemde.min.js" %}
+ {% style "/vendor/simplemde/dist/simplemde.min.css" %}
+ {% script "/vendor/simplemde/dist/simplemde.min.js" %}
{% endifequal %}
{% endblock %}
diff --git a/src/smeagol/sanity.clj b/src/smeagol/sanity.clj
index e0a57f3..f16a127 100644
--- a/src/smeagol/sanity.clj
+++ b/src/smeagol/sanity.clj
@@ -120,7 +120,6 @@
configured content directory."
([path]
(compound-check-results
- (check-with-protection check-exists :file-or-directory path :content-dir-exists)
(check-with-protection check-is-dir :file-or-directory path :content-dir-is-dir)
(check-can-read-and-write path :content-dir)
(apply compound-check-results
@@ -133,6 +132,25 @@
(check-content-dir util/content-dir)))
+(defn check-upload-dir
+ "Check that the upload directory at `path` (defaults to configured upload path)
+ exists and is readable and writable; check that each of the configured
+ thumbnail subdirectories also exists and is writable."
+ ([path]
+ (compound-check-results
+ (check-with-protection check-is-dir :file-or-directory path :upload-dir-is-dir)
+ (check-can-read-and-write path :upload-dir)
+ (apply
+ compound-check-results
+ (map
+ #(let [p (cjio/file path (name %))]
+ (compound-check-results
+ (check-with-protection check-is-dir :file-or-directory p :thumbnails)
+ (check-with-protection check-can-read-and-write :file-or-directory p :thumbnails)))
+ (keys (:thumbnails config))))))
+ ([] (check-upload-dir util/upload-dir)))
+
+
(defn check-password-member-field
"Check that this `member` map, expected to be an entry from the passwd
file whose key was `user-key`, has this `field` and if not return a
@@ -221,13 +239,14 @@
(defn check-everything
- ([content-dir config-path passwd-path]
+ ([content-dir upload-dir config-path passwd-path]
(compound-check-results
(check-content-dir content-dir)
+ (check-upload-dir upload-dir)
(check-config config-path)
(check-password-file passwd-path)))
([]
- (check-everything util/content-dir config-file-path password-file-path)))
+ (check-everything util/content-dir util/upload-dir config-file-path password-file-path)))
(defn- get-causes
@@ -367,7 +386,8 @@
[:a
{:href
"https://github.com/journeyman-cc/smeagol/wiki/Deploying-Smeagol"}
- (as-hiccup :here messages)] "."])
+ (as-hiccup :here messages)] ". "
+ (as-hiccup :fix-and-restart messages) "."])
(defn as-hiccup-footer