diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 2da8f8f2..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build - -on: - pull_request: - branches: - - master - - exampleSite - workflow_dispatch: - # manual run - inputs: - hugoVersion: - description: "Hugo Version" - required: false - default: "0.83.0" - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Git checkout - uses: actions/checkout@v2 - with: - ref: exampleSite - - - name: Get Theme - run: git submodule update --init --recursive - - - name: Update theme to Latest commit - run: git submodule update --remote --merge - - - name: Setup hugo - uses: peaceiris/actions-hugo@v2 - with: - hugo-version: "${{ github.event.inputs.hugoVersion }}" - - - name: Build - run: hugo --buildDrafts --gc --verbose --minify diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 75033f82..305a6dec 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,4 +1,4 @@ -name: Build GH-Pages +name: Deploy Hugo PaperMod Demo to Pages on: push: @@ -17,31 +17,64 @@ on: required: false default: "0.83.0" +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +# Default to bash +defaults: + run: + shell: bash + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + jobs: - deploy: + # Build job + build: runs-on: ubuntu-latest + env: + HUGO_VERSION: "0.83.0" steps: - - name: Git checkout - uses: actions/checkout@v2 + - name: Check version + if: ${{ github.event.inputs.hugoVersion }} + run: export HUGO_VERSION="${{ github.event.inputs.hugoVersion }}" + - name: Install Hugo CLI + run: | + wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Checkout + uses: actions/checkout@v3 with: ref: exampleSite - + - name: Setup Pages + id: pages + uses: actions/configure-pages@v1 - name: Get Theme run: git submodule update --init --recursive - - name: Update theme to Latest commit run: git submodule update --remote --merge - - - name: Setup hugo - uses: peaceiris/actions-hugo@v2 + - name: Build with Hugo + run: | + hugo \ + --buildDrafts --gc --verbose \ + --baseURL ${{ steps.pages.outputs.base_url }} + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 with: - hugo-version: "${{ github.event.inputs.hugoVersion }}" - - - name: Build - run: hugo --buildDrafts --gc --verbose --minify - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.TOKEN }} - publish_dir: ./public + path: ./public + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/assets/css/common/header.css b/assets/css/common/header.css index 502d7ee9..6387055a 100644 --- a/assets/css/common/header.css +++ b/assets/css/common/header.css @@ -27,7 +27,7 @@ font-weight: 700; } -.logo a img { +.logo a img, .logo a svg { display: inline; vertical-align: middle; pointer-events: none; diff --git a/assets/js/fastsearch.js b/assets/js/fastsearch.js index ea110221..02d1396a 100644 --- a/assets/js/fastsearch.js +++ b/assets/js/fastsearch.js @@ -1,21 +1,21 @@ import * as params from '@params'; -var fuse; // holds our search engine -var resList = document.getElementById('searchResults'); -var sInput = document.getElementById('searchInput'); -var first, last, current_elem = null -var resultsAvailable = false; +let fuse; // holds our search engine +let resList = document.getElementById('searchResults'); +let sInput = document.getElementById('searchInput'); +let first, last, current_elem = null +let resultsAvailable = false; // load our search index window.onload = function () { - var xhr = new XMLHttpRequest(); + let xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (xhr.status === 200) { - var data = JSON.parse(xhr.responseText); + let data = JSON.parse(xhr.responseText); if (data) { // fuse.js options; check fuse.js website for details - var options = { + let options = { distance: 100, threshold: 0.4, ignoreLocation: true, @@ -106,12 +106,12 @@ sInput.addEventListener('search', function (e) { // kb bindings document.onkeydown = function (e) { let key = e.key; - var ae = document.activeElement; + let ae = document.activeElement; let inbox = document.getElementById("searchbox").contains(ae) if (ae === sInput) { - var elements = document.getElementsByClassName('focus'); + let elements = document.getElementsByClassName('focus'); while (elements.length > 0) { elements[0].classList.remove('focus'); } diff --git a/i18n/bn.yaml b/i18n/bn.yaml index 9fdafd16..9c5a2c44 100644 --- a/i18n/bn.yaml +++ b/i18n/bn.yaml @@ -1,8 +1,8 @@ - id: prev_page - translation: "পূর্বের পাতা" + translation: "পূর্ববর্তী" - id: next_page - translation: "পরবর্তী পাতা" + translation: "পরবর্তী" - id: read_time translation: diff --git a/i18n/ja.yaml b/i18n/ja.yaml index c286ef9e..bc7bf377 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -9,8 +9,25 @@ one : "1 分" other: "{{ .Count }} 分" +- id: words + translation: + one: "文字" + other: "{{ .Count }} 文字" + - id: toc translation: "目次" - id: translations translation: "言語" + +- id: home + translation: "ホーム" + +- id: edit_post + translation: "編集" + +- id: code_copy + translation: "コピー" + +- id: code_copied + translation: "コピーされました!" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 01ba7525..3a6f316e 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -40,6 +40,7 @@ {{- if .IsHome }} {{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} +{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }} {{- end }} {{- $paginator := .Paginate $pages }} @@ -87,10 +88,20 @@ diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 40e4acf2..5621a135 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -32,6 +32,9 @@ {{- if site.Params.analytics.bing.SiteVerificationTag }} {{- end }} +{{- if site.Params.analytics.naver.SiteVerificationTag }} + +{{- end }} {{- /* Styles */}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a1dda22d..a2eabbea 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -40,6 +40,8 @@ {{- end -}} + {{- else if hasPrefix site.Params.label.iconSVG " diff --git a/layouts/partials/social_icons.html b/layouts/partials/social_icons.html index 7c16e30e..3f8d6a35 100644 --- a/layouts/partials/social_icons.html +++ b/layouts/partials/social_icons.html @@ -1,6 +1,6 @@
{{- range . }} - + {{ partial "svg.html" . }} {{- end }} diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index f66fa9c6..1e1f9dc7 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -127,6 +127,11 @@ +{{- else if (eq $icon_name "deviantart") -}} + + + {{- else if (eq $icon_name "deezer") -}} +{{- else if (eq $icon_name "patreon") -}} + + + {{- else if (eq $icon_name "paypal") -}} @@ -546,6 +555,10 @@ +{{- else if (eq $icon_name "threema") -}} + + + {{- else if (eq $icon_name "tiktok") -}} @@ -571,6 +584,11 @@ d="M37.892,13.5h-4.486 l-1.143-3.306C31.707,8.581,30.189,7.5,28.483,7.5h-9.045c-1.706,0-3.224,1.081-3.781,2.694L14.515,13.5H9.108 c-2.545,0-4.608,2.063-4.608,4.608v16.785c0,2.545,2.063,4.608,4.608,4.608h28.785c2.545,0,4.608-2.063,4.608-4.608V18.108 C42.5,15.563,40.437,13.5,37.892,13.5z" /> +{{- else if (eq $icon_name "vimeo") -}} + + + {{- else if (eq $icon_name "xda") -}}