parent
8fade5954c
commit
ebd2db97d0
5 changed files with 178 additions and 0 deletions
@ -0,0 +1,18 @@ |
||||
#+title: Single Post with suppressed lastmod |
||||
#+hugo_base_dir: ../../ |
||||
#+hugo_section: singles |
||||
#+date: [2118-09-01 Sat 05:08] |
||||
#+macro: doc [[https://ox-hugo.scripter.co/doc/$1][$2]] |
||||
#+hugo_auto_set_lastmod: t |
||||
|
||||
This post will not export =lastmod= because |
||||
=org-hugo-suppress-lastmod-period= is greater than the time |
||||
difference between =[2118-09-01 Sat 05:08]= and the current |
||||
date. |
||||
|
||||
* Local Variables :ARCHIVE: |
||||
# Local Variables: |
||||
# org-hugo-auto-set-lastmod: nil |
||||
# org-hugo-suppress-lastmod-period: 0.0 |
||||
# End: |
||||
|
||||
@ -0,0 +1,16 @@ |
||||
#+title: Single Post with unsuppressed lastmod |
||||
#+hugo_base_dir: ../../ |
||||
#+hugo_section: singles |
||||
#+date: [1999-09-01 Sat 05:11] |
||||
#+hugo_auto_set_lastmod: t |
||||
|
||||
This post will export =lastmod= because |
||||
=org-hugo-suppress-lastmod-period= is less than the time difference |
||||
between =[1999-09-01 Sat 05:11]= and the current date. |
||||
|
||||
* Local Variables :ARCHIVE: |
||||
# Local Variables: |
||||
# org-hugo-auto-set-lastmod: nil |
||||
# org-hugo-suppress-lastmod-period: 0.0 |
||||
# End: |
||||
|
||||
@ -0,0 +1,58 @@ |
||||
#+hugo_base_dir: ../ |
||||
|
||||
* org-hugo-suppress-lastmod-period |
||||
** DONE suppress lastmod with auto-set-lastmod |
||||
CLOSED: [2118-09-01 Wed 08:35] |
||||
:PROPERTIES: |
||||
:EXPORT_FILE_NAME: suppress-lastmod-in-subtree-with-auto-lastmod |
||||
:EXPORT_HUGO_AUTO_SET_LASTMOD: t |
||||
:END: |
||||
|
||||
This post will never export =lastmod= when you initially change the |
||||
Org TODO state to =DONE= by saving the file because |
||||
=org-hugo-suppress-lastmod-period= is always greater than the time |
||||
difference between =date= and =lastmod= in the following condition. |
||||
|
||||
| Variable | Value | |
||||
|----------------------------------+-------| |
||||
| org-hugo-suppress-lastmod-period | 60.0 | |
||||
| org-hugo-auto-set-lastmod | t | |
||||
| org-hugo-auto-export-on-save | t | |
||||
| org-log-done | time | |
||||
|
||||
For instance, auto generated =date= would be =2018-09-01T08:00:00+00:00= |
||||
and =lastmod= could be =2018-09-01T08:00:59+00:00=. The time |
||||
difference is less than =org-hugo-suppress-lastmod-period= so |
||||
=lastmod= filed will not be exported. But if you change something in |
||||
this post after the initial exporting, the =lastmod= will be exported |
||||
because the time difference will exceed |
||||
=org-hugo-suppress-lastmod-period=. |
||||
|
||||
** DONE unsuppress lastmod |
||||
CLOSED: [1999-09-01 Sat 02:57] |
||||
:PROPERTIES: |
||||
:EXPORT_FILE_NAME: unsuppress-lastmod-in-subtree |
||||
:EXPORT_HUGO_AUTO_SET_LASTMOD: t |
||||
:END: |
||||
|
||||
This post will export =lastmod= because |
||||
=org-hugo-suppress-lastmod-period= is less than the time difference |
||||
between =[1999-09-01 Sat 02:57]= and the current date. |
||||
|
||||
** DONE ignore suppress lastmod |
||||
CLOSED: [2018-09-05 Wed 14:19] |
||||
:PROPERTIES: |
||||
:EXPORT_FILE_NAME: ignore-suppress-lastmod-in-subtree |
||||
:EXPORT_HUGO_LASTMOD: 1999-09-05 |
||||
:EXPORT_HUGO_AUTO_SET_LASTMOD: nil |
||||
:END: |
||||
|
||||
This post will export =lastmod= because =EXPORT_HUGO_LASTMOD= is |
||||
provided even if =org-hugo-suppress-lastmod-period= is less than the |
||||
time difference between =[2018-09-05 Wed 14:19]= and =1999-09-05=. |
||||
|
||||
* Local Variables :ARCHIVE: |
||||
# Local Variables: |
||||
# org-hugo-auto-set-lastmod: nil |
||||
# org-hugo-suppress-lastmod-period: 0.0 |
||||
# End: |
||||
Loading…
Reference in new issue