Skip to content

Commit

Permalink
feat: i18n lastmod (#270)
Browse files Browse the repository at this point in the history
ci: Deploy to Netlify https://github.com/nwtgck/actions-netlify
build: set baseURL to root
  • Loading branch information
peaceiris authored Jan 10, 2021
1 parent f071914 commit 7f14bc6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ jobs:
- run: make cibuild

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './exampleSite/public'
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: true
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1

test-docker:
runs-on: ubuntu-18.04
if: contains(github.event.head_commit.message, '[skip ci]') == false
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ cibuild:
cd ./exampleSite && \
hugo --minify \
--themesDir ../../ \
--baseURL $(BASE_URL) \
--baseURL '/' \
--cleanDestinationDir \
--i18n-warnings --path-warnings --debug \
--templateMetrics --templateMetricsHints
2 changes: 2 additions & 0 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
toc:
other: Table of Contents
lastmod:
other: Lastmod
2 changes: 2 additions & 0 deletions i18n/ja.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
toc:
other: 目次
lastmod:
other: 最終更新
2 changes: 1 addition & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1 class="title is-spaced">
{{ end }}
</p>
{{ partial "breadcrumb" . }}
<p class="has-text-grey-light is-pulled-right">Lastmod: {{ .Lastmod.Format "2006-01-02" }}</p>
<p class="has-text-grey-light is-pulled-right">{{ i18n "lastmod" . }}: {{ .Lastmod.Format "2006-01-02" }}</p>
</div>
</div>
</section>
Expand Down

1 comment on commit 7f14bc6

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.