diff --git a/Makefile b/Makefile index 9671278..ddb3ab9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Time-stamp: <2018-08-27 13:31:30 kmodi> +# Time-stamp: <2018-08-28 10:45:59 kmodi> # Makefile to export org documents to md for Hugo from the command line # Run just "make" to see usage examples. @@ -101,6 +101,8 @@ help: # version that ships with Emacs and then run the stuff in --eval that # loads the new Org version.. and thus we'll end up with mixed Org in # the load-path. +# The LANG env var is hard-coded to "en_US.UTF-8" so that the Locale +# auto-detection test always passes. emacs-batch: @echo "" @echo "$(ORG_FILE) ::" @@ -109,6 +111,7 @@ emacs-batch: (toggle-debug-on-error)\ (setenv \"OX_HUGO_ELPA\" \"$(OX_HUGO_ELPA)\")\ (when (> (length \"$(TIMEZONE)\") 0) (setenv \"TZ\" \"$(TIMEZONE)\"))\ + (setenv \"LANG\" \"en_US.UTF-8\")\ (setq-default make-backup-files nil)\ (load-file (expand-file-name \"setup-ox-hugo.el\" \"$(OX_HUGO_TEST_DIR)\"))\ )" $(ORG_FILE) \ diff --git a/test/site/content-org/all-posts.org b/test/site/content-org/all-posts.org index b91eff4..fc25dcb 100644 --- a/test/site/content-org/all-posts.org +++ b/test/site/content-org/all-posts.org @@ -5443,10 +5443,20 @@ Post content. :EXPORT_FILE_NAME: locale-specified :EXPORT_HUGO_LOCALE: es_ES :END: +#+begin_description +Specify the locale using ~:EXPORT_HUGO_LOCALE: es_ES~ property. +#+end_description +Locale exporting is enabled using ~:EXPORT_HUGO_WITH_LOCALE: t~ in the +post's parent subtree. *** Auto-detected locale in front-matter :auto_detect: :PROPERTIES: :EXPORT_FILE_NAME: locale-auto-detect :END: +#+begin_description +Locale is not specified, so is auto-detected. +#+end_description +Locale exporting is enabled using ~:EXPORT_HUGO_WITH_LOCALE: t~ in the +post's parent subtree. ** Images :images: *** Single image :single: :PROPERTIES: diff --git a/test/site/content/posts/locale-auto-detect.md b/test/site/content/posts/locale-auto-detect.md index b3306f5..647dde5 100644 --- a/test/site/content/posts/locale-auto-detect.md +++ b/test/site/content/posts/locale-auto-detect.md @@ -1,6 +1,10 @@ +++ title = "Auto-detected locale in front-matter" +description = "Locale is not specified, so is auto-detected." tags = ["front-matter", "locale", "auto-detect"] draft = false locale = "en_US" +++ + +Locale exporting is enabled using `:EXPORT_HUGO_WITH_LOCALE: t` in the +post's parent subtree. diff --git a/test/site/content/posts/locale-specified.md b/test/site/content/posts/locale-specified.md index 774fcdb..b94a1ff 100644 --- a/test/site/content/posts/locale-specified.md +++ b/test/site/content/posts/locale-specified.md @@ -1,6 +1,10 @@ +++ title = "Specified locale in front-matter" +description = "Specify the locale using `:EXPORT_HUGO_LOCALE: es_ES` property." tags = ["front-matter", "locale"] draft = false locale = "es_ES" +++ + +Locale exporting is enabled using `:EXPORT_HUGO_WITH_LOCALE: t` in the +post's parent subtree.