Skip to content

Commit

Permalink
fix(build): switch to future posts visible in build and make it confi…
Browse files Browse the repository at this point in the history
…gurable through env var
  • Loading branch information
Guts committed Nov 19, 2024
1 parent dbb571a commit 15f89ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
MKDOCS_ENABLE_PLUGIN_TAGS: true
MKDOCS_ENABLE_PLUGIN_TYPESET: true
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
MKDOCS_PLUGIN_BLOG_DRAFT_FUTURE_DATE: false

- name: Setup Pages
uses: actions/configure-pages@v5
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr_checker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
MKDOCS_ENABLE_PLUGIN_RSS: true
MKDOCS_ENABLE_PLUGIN_SOCIAL: true
MKDOCS_ENABLE_PLUGIN_SOCIAL_CARDS: true
MKDOCS_PLUGIN_BLOG_DRAFT_FUTURE_DATE: false
MKDOCS_SITE_NAME: "Geotribu in English PREVIEW - PR ${{ github.event.pull_request.number }}"
MKDOCS_SITE_COPYRIGHT: '<a href="https://www.netlify.com/"><img alt="Deploys by Netlify" src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" style="float: right;"></a>'
run: |
Expand Down
4 changes: 2 additions & 2 deletions mkdocs-free.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ plugins:
authors_file: "{blog}/.authors.yml"
# authors_profiles: true
blog_dir: .
draft_on_serve: true
draft_if_future_date: true
draft_on_serve: !ENV [MKDOCS_PLUGIN_BLOG_DRAFT_SERVE, true]
draft_if_future_date: !ENV [MKDOCS_PLUGIN_BLOG_DRAFT_FUTURE_DATE, false]
pagination_format: "$link_first $link_previous ~2~ $link_next $link_last"
post_date_format: long
- search:
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ plugins:
authors_file: "{blog}/.authors.yml"
authors_profiles: true
blog_dir: .
draft_on_serve: true
draft_if_future_date: true
draft_on_serve: !ENV [MKDOCS_PLUGIN_BLOG_DRAFT_SERVE, true]
draft_if_future_date: !ENV [MKDOCS_PLUGIN_BLOG_DRAFT_FUTURE_DATE, false]
pagination_format: "$link_first $link_previous ~2~ $link_next $link_last"
post_date_format: long
- privacy:
Expand Down

0 comments on commit 15f89ee

Please sign in to comment.