Compare commits

..
77 Commits
Author SHA1 Message Date
Nuno Coração 2f12b8d0d9 Merge pull request #2169 from nunocoracao/dev
🔖 v2.87.0
2025-06-17 23:20:56 +01:00
Nuno Coração f2e224a042 pretty run 2025-06-17 23:17:26 +01:00
Nuno Coração 560e927b87 Merge pull request #2210 from espressif/fix/add_default_figure_shortcode_as_partial
🐛 fix: add default figure shortcode as partial
2025-06-17 23:12:54 +01:00
Nuno Coração 485b641756 Merge pull request #2226 from servedsmart/check-null-mobilemenu
🐛 Fix: null error when no [[menu]] block is defined
2025-06-17 23:07:37 +01:00
Nuno Coração 03f9c7d732 Merge pull request #2224 from Weaxs/support-adsense
✨ support advertisement
2025-06-17 23:06:45 +01:00
Nuno Coração 9aa6ec7e57 Merge pull request #2220 from Taffer/add-worktree-icon
Add icon for worktree.ca
2025-06-17 23:05:29 +01:00
Nuno Coração 472a89c7a5 Merge pull request #2211 from servedsmart/move-most-inline-styles-out-of-line
♻️ refactor: Move most inline styles out of line
2025-06-17 22:56:25 +01:00
Nuno Coração 92229cfda9 update 2025-06-17 22:55:27 +01:00
Nuno Coração 8fef4e4424 Merge pull request #2217 from jojoclt/main
Add Thai Translation
2025-06-17 22:52:06 +01:00
Nuno Coração fa6e9e122f Merge pull request #2214 from nunocoracao/dependabot/github_actions/dev/stefanzweifel/git-auto-commit-action-6
👷 Bump stefanzweifel/git-auto-commit-action from 5 to 6
2025-06-17 22:50:00 +01:00
Nuno Coração 3e52d26e30 Merge pull request #2216 from ZhenShuo2021/fix/showDate
🐛 Fix: date still shown when showDate=false
2025-06-17 22:49:46 +01:00
Nuno Coração e3e12fff5f Merge pull request #2215 from sorairolake/update-i18n-ja
🌐 Update Japanese translation
2025-06-17 22:49:06 +01:00
Nuno Coração 250b39c40e Merge pull request #2213 from rlan/feat/line-sharing-link
❇️ Add LINE to sharing links
2025-06-17 22:48:00 +01:00
Nuno Coração c2ea4c27b6 Merge pull request #2209 from servedsmart/move-similar-inline-scripts-out-of-line
♻️ refactor: Move similar javascript inline code out of line
2025-06-17 22:37:34 +01:00
Nuno Coração da44c6e047 update 2025-06-17 22:32:17 +01:00
Nuno Coração d97945d23b Merge pull request #2207 from ZhenShuo2021/fix/toc-active
🐛 Fix TOC Active State Loss with Dynamic Content
2025-06-17 22:31:32 +01:00
Nuno Coração 1c43a42adb Merge pull request #2202 from ZhenShuo2021/fix/toc-child
🐛 Fix: smartTOCHideUnfocusedChildren not collapsed
2025-06-17 22:31:12 +01:00
Nuno Coração c308942f0c Merge branch 'dev' of https://github.com/nunocoracao/blowfish into dev 2025-06-17 22:30:23 +01:00
Nuno Coração 771673c79a update 2025-06-17 22:30:15 +01:00
Nuno Coração 4c92836470 Merge pull request #2201 from ZhenShuo2021/fix/gist
🐛 Fix: gist shortcode breaks smartTOC
2025-06-17 22:27:15 +01:00
Nuno Coração 87f4f2529a Merge pull request #2182 from ZhenShuo2021/chore/move-config
🔧 chore: move markup config to markup.toml
2025-06-17 22:26:47 +01:00
Nuno Coração 7269b6642d Merge pull request #2176 from ZhenShuo2021/dev/format-tool
🎨 Style: add formatter config
2025-06-17 22:22:19 +01:00
Nuno Coração f3ea173e21 Merge branch 'dev' into dev/format-tool 2025-06-17 22:20:12 +01:00
Nuno Coração 86bc307033 Merge pull request #2173 from ZhenShuo2021/docs/uncached-head
📝 Docs: add docs for uncached head
2025-06-17 22:16:31 +01:00
Nuno Coração ce88fc8b27 increase number of items in homepage 2025-06-17 22:15:52 +01:00
Nuno Coração 6d73dcc941 details to contributing.md 2025-06-17 22:12:42 +01:00
Nuno Coração 7524bbca7e Merge pull request #2172 from ZhenShuo2021/chore/dev-cmd
🔧 Chore: adjust develope command
2025-06-17 22:09:36 +01:00
Nuno Coração e3994c650e Merge pull request #2203 from nunocoracao/dependabot/npm_and_yarn/dev/puppeteer-24.10.0
📌 Bump puppeteer from 24.9.0 to 24.10.0
2025-06-17 22:08:17 +01:00
Nuno Coração f864a3da51 Merge pull request #2212 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2025-06-17 22:07:13 +01:00
Served Smart cee01113cd 🐛 Fix: null error when no [[menu]] block is defined
- This fixes https://github.com/nunocoracao/blowfish/issues/2117
- Additionally this also removes unnecessary parameters in used functions
2025-06-16 19:59:48 +02:00
Weaxs 52b47665c8 support advertisement 2025-06-16 16:18:51 +08:00
Chris Herborth 64d8a6267b Add icon for worktree.ca, a Gitea instance in Canada 2025-06-12 12:37:55 -04:00
Served Smart d97b1e5c38 ➖ Remove tailwindcss v4.1.7 from package-lock.json 2025-06-12 14:33:04 +02:00
Served Smart de49717700 💄 Rebuild CSS for refactoring changes 2025-06-12 14:32:06 +02:00
Served Smart 9f85c0566e ♻️ refactor: Move most inline styles out of line
- Move out of line by using already defined css classes
- Move paddings out of line
- Move margins out of line
- Move z-indexes out of line
- Move center-relative-left out of line
2025-06-12 14:00:21 +02:00
Served Smart 9cb0db3e08 🎨 structure: Use more explicit naming in setBackgroundBlur() 2025-06-12 13:58:59 +02:00
Served Smart 4ff3d07d30 🎨 structure: Use more explicit naming in fetchRepo() 2025-06-12 13:58:59 +02:00
Served Smart 37ab1055e7 ♻️ refactor: Move similar javascript inline code out of line
- Move variables oid, oid_likes out of line
- Move background-blur out of line
- Move fetch-repo code out of line
2025-06-12 13:58:59 +02:00
Jojo Chan 07c897c3b9 Add Thai Translation 2025-06-11 21:19:35 +08:00
ZhenShuo Leo c3fbfc9545 fix: date still shown when showDate=false 2025-06-11 18:31:15 +08:00
Shun Sakai eee95cf5a7 🌐 Update Japanese translation 2025-06-11 18:49:09 +09:00
ZhenShuo Leo 72a6b84d04 chore: remove "dev" suffix 2025-06-11 15:23:47 +08:00
dependabot[bot] a6739eb7d8 👷 Bump stefanzweifel/git-auto-commit-action from 5 to 6
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 5 to 6.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-11 05:15:58 +00:00
Rick Lan 64e09b546b Fix missing space 2025-06-08 20:54:07 +09:00
Rick Lan 0b1f43373f Add LINE to sharing links 2025-06-08 20:10:14 +09:00
nunocoracao bcf13c4dee Update Hugo supported version 2025-06-08 06:06:20 +00:00
Nuno Coração 8387c6ea0a Merge pull request #2175 from ZhenShuo2021/chore/config
🔧 Chore: sync exampleSite config and root config
2025-06-06 15:04:55 +01:00
Nuno Coração 397197a890 Merge branch 'dev' into chore/config 2025-06-06 15:04:40 +01:00
dependabot[bot] c9369d61e6 📌 Bump puppeteer from 24.9.0 to 24.10.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 24.9.0 to 24.10.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v24.9.0...puppeteer-v24.10.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-version: 24.10.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-06 14:01:01 +00:00
Nuno Coração a1db31f370 Merge pull request #2204 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss/cli-4.1.8
📌 Bump @tailwindcss/cli from 4.1.7 to 4.1.8
2025-06-06 15:00:04 +01:00
Nuno Coração 0b5792987f Merge pull request #2205 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss-4.1.8
📌 Bump tailwindcss from 4.1.7 to 4.1.8
2025-06-06 14:59:50 +01:00
Nuno Coração 1320d51586 Merge pull request #2206 from nunocoracao/dependabot/npm_and_yarn/dev/prettier-plugin-tailwindcss-0.6.12
📌 Bump prettier-plugin-tailwindcss from 0.6.11 to 0.6.12
2025-06-06 14:59:29 +01:00
kirill.chalov 58f0e30d65 🐛 fix: add default figure shortcode as partial
Hugo v0.146 removed access to embedded templates like "_internal/shortcodes/figure.html".
This commit adds the template as figure-default.html.

This fixes build errors reported and partially solved in issues #2052 and #2093
when using the figure shortcode with the "default=true" option.
2025-06-05 16:34:12 +08:00
ZhenShuo Leo e6f0522b60 🐛 fix(toc): prevent active state loss from dynamically loaded content 2025-06-04 13:52:01 +08:00
dependabot[bot] 018b6ece23 💄 Rebuild CSS 2025-06-04 05:51:50 +00:00
dependabot[bot] 456f630dab 📌 Bump prettier-plugin-tailwindcss from 0.6.11 to 0.6.12
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.6.11 to 0.6.12.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.11...v0.6.12)

---
updated-dependencies:
- dependency-name: prettier-plugin-tailwindcss
  dependency-version: 0.6.12
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-04 05:51:41 +00:00
dependabot[bot] 73411d6865 📌 Bump tailwindcss from 4.1.7 to 4.1.8
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) from 4.1.7 to 4.1.8.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.8/packages/tailwindcss)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-version: 4.1.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-04 05:51:32 +00:00
dependabot[bot] eaceca84fb 📌 Bump @tailwindcss/cli from 4.1.7 to 4.1.8
Bumps [@tailwindcss/cli](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-cli) from 4.1.7 to 4.1.8.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.8/packages/@tailwindcss-cli)

---
updated-dependencies:
- dependency-name: "@tailwindcss/cli"
  dependency-version: 4.1.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-04 05:51:21 +00:00
ZhenShuo Leo 4ca31fadca 🐛 fix: toc child not collapsed 2025-06-04 12:18:33 +08:00
ZhenShuo Leo 7cc521bc1e 🐛 fix: gist shortcode breaks smartTOC 2025-06-04 11:08:38 +08:00
Nuno Coração 850f987a68 Merge pull request #2199 from deining/fix-warning-_build
Fix warning on deprecated front matter key 'build'
2025-06-04 00:21:10 +01:00
Nuno Coração 3aabf55f89 Merge pull request #2200 from nunocoracao/dependabot/npm_and_yarn/tar-fs-3.0.9
chore(deps-dev): bump tar-fs from 3.0.8 to 3.0.9
2025-06-04 00:19:38 +01:00
Nuno Coração 9b6fffafc3 Merge pull request #2194 from servedsmart/fingerprint-algorithm
🔒 Add config parameter fingerprintAlgorithm
2025-06-04 00:11:55 +01:00
dependabot[bot] d10340d72c chore(deps-dev): bump tar-fs from 3.0.8 to 3.0.9
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.8 to 3.0.9.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.8...v3.0.9)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-03 23:10:35 +00:00
Andreas Deininger 8fdd687640 Fix warning on deprecated front matter key 'build' 2025-06-03 23:05:17 +02:00
Served Smart dc36597427 🔒 Add config parameter fingerprintAlgorithm
This parameter allows users to choose their algorithm for html integrity checks. This mainly affects Hugo's fingerprint
2025-06-03 11:53:03 +02:00
Nuno Coração 80e9daaf67 Merge pull request #2181 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2025-06-03 00:31:18 +01:00
nunocoracao 9751a37436 Update Hugo supported version 2025-06-01 06:06:21 +00:00
ZhenShuo Leo 90b798ec33 📝 docs: update math delimiter for #2127 2025-05-29 01:56:37 +08:00
ZhenShuo Leo e26d1c7e74 🔧 chore: move markup config to markup.toml 2025-05-29 01:46:50 +08:00
ZhenShuo Leo e785f50575 style: add formatter config 2025-05-28 07:40:58 +08:00
ZhenShuo Leo d4ab6b1159 chore: sync exampleSite config and root config 2025-05-28 06:01:02 +08:00
ZhenShuo Leo 6be21955d5 docs: add uncached head 2025-05-28 04:49:34 +08:00
ZhenShuo Leo fb2c7b88e2 chore: adjust develope command 2025-05-28 02:01:58 +08:00
Nuno Coração 287bb274eb Merge pull request #2171 from timcappalli/main
📝 docs update for showCategoryOnly
2025-05-27 15:36:12 +01:00
Tim Cappalli 87138e8ee0 add showCategoryOnly 2025-05-27 10:11:48 +03:00
Nuno Coração 533e7c5015 new version seed 2025-05-27 01:04:48 +01:00
188 changed files with 2382 additions and 1210 deletions

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
+5 -5
View File
@@ -16,28 +16,28 @@ jobs:
- run: npm install - run: npm install
- run: npm run assets - run: npm run assets
- name: Commit and push Chart.js changes - name: Commit and push Chart.js changes
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v6
with: with:
branch: "${{ github.head_ref }}" branch: "${{ github.head_ref }}"
push_options: "--dry-run" push_options: "--dry-run"
file_pattern: "assets/lib/chart/*" file_pattern: "assets/lib/chart/*"
commit_message: "📦 Update packaged ChartJS" commit_message: "📦 Update packaged ChartJS"
- name: Commit Fuse changes - name: Commit Fuse changes
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v6
with: with:
branch: "${{ github.head_ref }}" branch: "${{ github.head_ref }}"
push_options: "--dry-run" push_options: "--dry-run"
file_pattern: "assets/lib/fuse/*" file_pattern: "assets/lib/fuse/*"
commit_message: "📦 Update packaged FuseJS" commit_message: "📦 Update packaged FuseJS"
- name: Commit KaTeX changes - name: Commit KaTeX changes
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v6
with: with:
branch: "${{ github.head_ref }}" branch: "${{ github.head_ref }}"
push_options: "--dry-run" push_options: "--dry-run"
file_pattern: "assets/lib/katex/*" file_pattern: "assets/lib/katex/*"
commit_message: "📦 Update packaged KaTeX" commit_message: "📦 Update packaged KaTeX"
- name: Commit Mermaid changes - name: Commit Mermaid changes
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v6
with: with:
branch: "${{ github.head_ref }}" branch: "${{ github.head_ref }}"
push_options: "--dry-run" push_options: "--dry-run"
@@ -45,7 +45,7 @@ jobs:
commit_message: "📦 Update packaged Mermaid" commit_message: "📦 Update packaged Mermaid"
- run: npm run build - run: npm run build
- name: Commit CSS changes - name: Commit CSS changes
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v6
with: with:
branch: "${{ github.head_ref }}" branch: "${{ github.head_ref }}"
push_options: "--dry-run" push_options: "--dry-run"
+4 -3
View File
@@ -2,7 +2,7 @@ name: Update Hugo version
on: on:
schedule: schedule:
- cron: '0 6 * * *' - cron: "0 6 * * *"
workflow_dispatch: workflow_dispatch:
@@ -10,7 +10,6 @@ jobs:
updateBlowfish: updateBlowfish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -26,7 +25,9 @@ jobs:
- name: Check for modified files - name: Check for modified files
id: git-check id: git-check
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") run:
echo ::set-output name=modified::$([ -z "`git status --porcelain`" ]
&& echo "false" || echo "true")
- name: Update config.toml - name: Update config.toml
id: update-config id: update-config
+8 -6
View File
@@ -7,12 +7,11 @@ name: Mark stale issues and pull requests
on: on:
schedule: schedule:
- cron: '0 1 * * *' - cron: "0 1 * * *"
workflow_dispatch: workflow_dispatch:
jobs: jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
issues: write issues: write
@@ -22,10 +21,13 @@ jobs:
- uses: actions/stale@v9 - uses: actions/stale@v9
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue will be closed since it has been stale for 60 days.' stale-issue-message:
stale-pr-message: 'This pull request will be closed since it has been stale for 60 days.' "This issue will be closed since it has been stale for 60 days."
stale-issue-label: 'no-issue-activity' stale-pr-message:
stale-pr-label: 'no-pr-activity' "This pull request will be closed since it has been stale for 60
days."
stale-issue-label: "no-issue-activity"
stale-pr-label: "no-pr-activity"
days-before-stale: 60 days-before-stale: 60
days-before-close: 0 days-before-close: 0
remove-stale-when-updated: true remove-stale-when-updated: true
+3 -1
View File
@@ -22,4 +22,6 @@ jobs:
- name: Build - name: Build
working-directory: ./exampleSite working-directory: ./exampleSite
run: hugo --minify --themesDir ../.. --baseURL https://nunocoracao.github.io/blowfish/ run:
hugo --minify --themesDir ../.. --baseURL
https://nunocoracao.github.io/blowfish/
+40
View File
@@ -0,0 +1,40 @@
# https://github.com/gohugoio/hugo/blob/b39b24962350090122b5f3927456dde710cffb57/docs/.prettierignore
# https://github.com/gohugoio/hugo/blob/b39b24962350090122b5f3927456dde710cffb57/docs/.prettierrc
# develop
.vscode
node_modules
package.json
# Hugo
assets/lib
assets/css/compiled
content
themes
public
static
*.md
# Invalid nodes and unexpected tokens, mostly caused by unmatched tags in Hugo statements.
# For example:
# {{ with .Params.externalUrl }}
# <a href="{{ . }}">
# {{ else }}
# <a href="{{ .RelPermalink }}" class="min-w-full">
# {{ end }}
#
# This create an unclose node
layouts/_default/_markup/render-heading.html
layouts/_default/index.json
layouts/_default/list.html
layouts/partials/article-link/card-related.html
layouts/partials/article-link/card.html
layouts/partials/article-link/simple.html
layouts/partials/header/basic.html
layouts/partials/hero/background.html
layouts/partials/head.html
layouts/shortcodes/screenshot.html
layouts/shortcodes/figure.html
assets/js/appearance.js
+45
View File
@@ -0,0 +1,45 @@
{
"singleQuote": false,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"trailingComma": "all",
"proseWrap": "always",
"plugins": [
"prettier-plugin-go-template",
"@awmottaz/prettier-plugin-void-html"
],
"overrides": [
{
"files": ["*.html"],
"options": {
"useTabs": false,
"parser": "go-template",
"goTemplateBracketSpacing": true,
"printWidth": 112,
"bracketSameLine": true
}
},
{
"files": ["*.js", "*.mjs", "*.mts", "*.ts"],
"options": {
"semi": true,
"useTabs": false,
"printWidth": 112,
"singleQuote": false
}
},
{
"files": ["*.yml", "*.yaml"],
"options": {
"singleQuote": false
}
},
{
"files": ["*.json*"],
"options": {
"trailingComma": "none"
}
}
]
}
+2 -2
View File
@@ -12,7 +12,7 @@
- Great! Open a new GitHub pull request with the patch. - Great! Open a new GitHub pull request with the patch.
- All development occurs on the `dev` branch and new PRs should be forked from here. - All development occurs on the `dev` branch and new PRs should be forked from here.
- The command `npm run example` can be used to test local changes using the example site. - The commands `npm run example`, `npm run example:core`, and `npm run example:production` can be used to test local changes using the example site.
- Ensure the PR description clearly describes the problem and solution. Include the relevant issue number, if applicable. - Ensure the PR description clearly describes the problem and solution. Include the relevant issue number, if applicable.
- **Before submitting**, check the [coding conventions](#coding-conventions) section below to learn more about coding and commit message expectations. - **Before submitting**, check the [coding conventions](#coding-conventions) section below to learn more about coding and commit message expectations.
@@ -45,7 +45,7 @@ The project includes a Prettier config that helps to format code in line with th
#### Commit message guidelines #### Commit message guidelines
- Use [Gitmoji](https://gitmoji.dev) in commit messages to provide context. - Use [Gitmoji](https://gitmoji.dev) in PR messages to provide context.
- Clearly describe the change with a short summary in the first 72 characters. - Clearly describe the change with a short summary in the first 72 characters.
- Place more detailed explanations in paragraphs below the summary, separated by a blank line. - Place more detailed explanations in paragraphs below the summary, separated by a blank line.
- Use imperative language (ie. "Fix bug", not "Fixed bug" or "Fixes bug"). - Use imperative language (ie. "Fix bug", not "Fixed bug" or "Fixes bug").
+5 -1
View File
@@ -1,2 +1,6 @@
github: [nunocoracao] github: [nunocoracao]
custom: ["https://www.paypal.me/nunocoracao", "https://www.buymeacoffee.com/nunocoracao"] custom:
[
"https://www.paypal.me/nunocoracao",
"https://www.buymeacoffee.com/nunocoracao",
]
+37 -1
View File
@@ -1,4 +1,4 @@
/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */ /*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */
/*! Blowfish | MIT License | https://github.com/nunocoracao/blowfish */ /*! Blowfish | MIT License | https://github.com/nunocoracao/blowfish */
@layer properties; @layer properties;
#zen-mode-button { #zen-mode-button {
@@ -3698,6 +3698,42 @@ pre {
height: 0px; height: 0px;
visibility: hidden; visibility: hidden;
} }
.center-relative-left {
left: calc(max(-50vw,-800px) + 50%);
}
.margin-0 {
margin: 0;
}
.margin-top-\[-15px\] {
margin-top: -15px;
}
.margin-top-\[0\.5rem\] {
margin-top: 0.5rem;
}
.margin-right-\[10px\] {
margin-right: 10px;
}
.margin-left-\[0px\] {
margin-left: 0px;
}
.padding-main-menu {
padding: 2px 0 3px 0;
}
.padding-top-\[5px\] {
padding-top: 5px;
}
.z-index-\[-10\] {
z-index: -10;
}
.z-index-80 {
z-index: 80;
}
.z-index-100 {
z-index: 100;
}
.z-index-500 {
z-index: 500;
}
[id^="fn"], [id^="fnref"] { [id^="fn"], [id^="fnref"] {
scroll-margin-top: 145px; scroll-margin-top: 145px;
} }
+3 -5
View File
@@ -1,5 +1,5 @@
#zen-mode-button { #zen-mode-button {
cursor:pointer cursor: pointer;
} }
.zen-mode { .zen-mode {
@@ -7,10 +7,8 @@
} }
body.zen-mode-enable { body.zen-mode-enable {
#bmc-wbtn, .author { #bmc-wbtn,
.author {
display: none !important; display: none !important;
} }
} }
+613 -150
View File
@@ -1,6 +1,6 @@
/*! Blowfish | MIT License | https://github.com/nunocoracao/blowfish */ /*! Blowfish | MIT License | https://github.com/nunocoracao/blowfish */
@import './components/zen-mode.css'; @import "./components/zen-mode.css";
@import "tailwindcss"; @import "tailwindcss";
@config "../../tailwind.config.js"; @config "../../tailwind.config.js";
@@ -122,7 +122,9 @@ button,
} }
/* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */ /* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */
.katex-display { overflow: auto hidden } .katex-display {
overflow: auto hidden;
}
/* Fix katex overflow https://github.com/nunocoracao/blowfish/issues/2138 */ /* Fix katex overflow https://github.com/nunocoracao/blowfish/issues/2138 */
.katex-display { .katex-display {
@@ -451,8 +453,49 @@ pre {
visibility: hidden; visibility: hidden;
} }
.center-relative-left {
left: calc(max(-50vw, -800px) + 50%);
}
.margin-0 {
margin: 0;
}
.margin-top-\[-15px\] {
margin-top: -15px;
}
.margin-top-\[0\.5rem\] {
margin-top: 0.5rem;
}
.margin-right-\[10px\] {
margin-right: 10px;
}
.margin-left-\[0px\] {
margin-left: 0px;
}
.padding-main-menu {
padding: 2px 0 3px 0;
}
.padding-top-\[5px\] {
padding-top: 5px;
}
.z-index-\[-10\] {
z-index: -10;
}
.z-index-80 {
z-index: 80;
}
.z-index-100 {
z-index: 100;
}
.z-index-500 {
z-index: 500;
}
/* Offset scroll position to avoid header overlap */ /* Offset scroll position to avoid header overlap */
[id^="fn"], [id^="fnref"] { [id^="fn"],
[id^="fnref"] {
scroll-margin-top: 145px; scroll-margin-top: 145px;
} }
@@ -484,19 +527,25 @@ pre {
.nested-menu:hover + .menuhide { .nested-menu:hover + .menuhide {
visibility: visible; visibility: visible;
opacity: 1; opacity: 1;
transition: visibility 0.3s, opacity 0.3s ease-in-out ; transition:
visibility 0.3s,
opacity 0.3s ease-in-out;
} }
.menuhide:hover { .menuhide:hover {
visibility: visible; visibility: visible;
opacity: 1; opacity: 1;
transition: visibility 0.3s, opacity 0.3s ease-in-out ; transition:
visibility 0.3s,
opacity 0.3s ease-in-out;
} }
.menuhide { .menuhide {
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
transition: visibility 0.3s, opacity 0.3s ease-in-out ; transition:
visibility 0.3s,
opacity 0.3s ease-in-out;
z-index: 1000; z-index: 1000;
} }
@@ -507,179 +556,593 @@ pre {
} }
/* Gallery Specific Styles */ /* Gallery Specific Styles */
.grid-w10 { width: calc(10% - 5px); margin: 0px !important; } .grid-w10 {
.grid-w15 { width: calc(15% - 5px); margin: 0px !important; } width: calc(10% - 5px);
.grid-w20 { width: calc(20% - 5px); margin: 0px !important; } margin: 0px !important;
.grid-w25 { width: calc(25% - 5px); margin: 0px !important; } }
.grid-w30 { width: calc(30% - 5px); margin: 0px !important; } .grid-w15 {
.grid-w33 { width: calc(33% - 5px); margin: 0px !important; } width: calc(15% - 5px);
.grid-w35 { width: calc(35% - 5px); margin: 0px !important; } margin: 0px !important;
.grid-w40 { width: calc(40% - 5px); margin: 0px !important; } }
.grid-w45 { width: calc(45% - 5px); margin: 0px !important; } .grid-w20 {
.grid-w50 { width: calc(50% - 5px); margin: 0px !important; } width: calc(20% - 5px);
.grid-w55 { width: calc(55% - 5px); margin: 0px !important; } margin: 0px !important;
.grid-w60 { width: calc(60% - 5px); margin: 0px !important; } }
.grid-w65 { width: calc(65% - 5px); margin: 0px !important; } .grid-w25 {
.grid-w66 { width: calc(66% - 5px); margin: 0px !important; } width: calc(25% - 5px);
.grid-w70 { width: calc(70% - 5px); margin: 0px !important; } margin: 0px !important;
.grid-w75 { width: calc(75% - 5px); margin: 0px !important; } }
.grid-w80 { width: calc(80% - 5px); margin: 0px !important; } .grid-w30 {
.grid-w85 { width: calc(85% - 5px); margin: 0px !important; } width: calc(30% - 5px);
.grid-w90 { width: calc(90% - 5px); margin: 0px !important; } margin: 0px !important;
.grid-w95 { width: calc(95% - 5px); margin: 0px !important; } }
.grid-w100 { width: calc(100% - 5px); margin: 0px !important; } .grid-w33 {
width: calc(33% - 5px);
margin: 0px !important;
}
.grid-w35 {
width: calc(35% - 5px);
margin: 0px !important;
}
.grid-w40 {
width: calc(40% - 5px);
margin: 0px !important;
}
.grid-w45 {
width: calc(45% - 5px);
margin: 0px !important;
}
.grid-w50 {
width: calc(50% - 5px);
margin: 0px !important;
}
.grid-w55 {
width: calc(55% - 5px);
margin: 0px !important;
}
.grid-w60 {
width: calc(60% - 5px);
margin: 0px !important;
}
.grid-w65 {
width: calc(65% - 5px);
margin: 0px !important;
}
.grid-w66 {
width: calc(66% - 5px);
margin: 0px !important;
}
.grid-w70 {
width: calc(70% - 5px);
margin: 0px !important;
}
.grid-w75 {
width: calc(75% - 5px);
margin: 0px !important;
}
.grid-w80 {
width: calc(80% - 5px);
margin: 0px !important;
}
.grid-w85 {
width: calc(85% - 5px);
margin: 0px !important;
}
.grid-w90 {
width: calc(90% - 5px);
margin: 0px !important;
}
.grid-w95 {
width: calc(95% - 5px);
margin: 0px !important;
}
.grid-w100 {
width: calc(100% - 5px);
margin: 0px !important;
}
@screen sm { @screen sm {
.sm\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; } .sm\:grid-w10 {
.sm\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; } width: calc(10% - 5px);
.sm\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; } margin: 0px !important;
.sm\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; } }
.sm\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; } .sm\:grid-w15 {
.sm\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; } width: calc(15% - 5px);
.sm\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; } margin: 0px !important;
.sm\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; } }
.sm\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; } .sm\:grid-w20 {
.sm\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; } width: calc(20% - 5px);
.sm\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; } margin: 0px !important;
.sm\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; } }
.sm\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; } .sm\:grid-w25 {
.sm\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; } width: calc(25% - 5px);
.sm\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; } margin: 0px !important;
.sm\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; } }
.sm\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; } .sm\:grid-w30 {
.sm\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; } width: calc(30% - 5px);
.sm\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; } margin: 0px !important;
.sm\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; } }
.sm\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; } .sm\:grid-w33 {
width: calc(33% - 5px);
margin: 0px !important;
}
.sm\:grid-w35 {
width: calc(35% - 5px);
margin: 0px !important;
}
.sm\:grid-w40 {
width: calc(40% - 5px);
margin: 0px !important;
}
.sm\:grid-w45 {
width: calc(45% - 5px);
margin: 0px !important;
}
.sm\:grid-w50 {
width: calc(50% - 5px);
margin: 0px !important;
}
.sm\:grid-w55 {
width: calc(55% - 5px);
margin: 0px !important;
}
.sm\:grid-w60 {
width: calc(60% - 5px);
margin: 0px !important;
}
.sm\:grid-w65 {
width: calc(65% - 5px);
margin: 0px !important;
}
.sm\:grid-w66 {
width: calc(66% - 5px);
margin: 0px !important;
}
.sm\:grid-w70 {
width: calc(70% - 5px);
margin: 0px !important;
}
.sm\:grid-w75 {
width: calc(75% - 5px);
margin: 0px !important;
}
.sm\:grid-w80 {
width: calc(80% - 5px);
margin: 0px !important;
}
.sm\:grid-w85 {
width: calc(85% - 5px);
margin: 0px !important;
}
.sm\:grid-w90 {
width: calc(90% - 5px);
margin: 0px !important;
}
.sm\:grid-w95 {
width: calc(95% - 5px);
margin: 0px !important;
}
.sm\:grid-w100 {
width: calc(100% - 5px);
margin: 0px !important;
}
} }
@screen md { @screen md {
.md\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; } .md\:grid-w10 {
.md\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; } width: calc(10% - 5px);
.md\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; } margin: 0px !important;
.md\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; } }
.md\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; } .md\:grid-w15 {
.md\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; } width: calc(15% - 5px);
.md\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; } margin: 0px !important;
.md\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; } }
.md\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; } .md\:grid-w20 {
.md\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; } width: calc(20% - 5px);
.md\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; } margin: 0px !important;
.md\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; } }
.md\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; } .md\:grid-w25 {
.md\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; } width: calc(25% - 5px);
.md\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; } margin: 0px !important;
.md\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; } }
.md\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; } .md\:grid-w30 {
.md\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; } width: calc(30% - 5px);
.md\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; } margin: 0px !important;
.md\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; } }
.md\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; } .md\:grid-w33 {
width: calc(33% - 5px);
margin: 0px !important;
}
.md\:grid-w35 {
width: calc(35% - 5px);
margin: 0px !important;
}
.md\:grid-w40 {
width: calc(40% - 5px);
margin: 0px !important;
}
.md\:grid-w45 {
width: calc(45% - 5px);
margin: 0px !important;
}
.md\:grid-w50 {
width: calc(50% - 5px);
margin: 0px !important;
}
.md\:grid-w55 {
width: calc(55% - 5px);
margin: 0px !important;
}
.md\:grid-w60 {
width: calc(60% - 5px);
margin: 0px !important;
}
.md\:grid-w65 {
width: calc(65% - 5px);
margin: 0px !important;
}
.md\:grid-w66 {
width: calc(66% - 5px);
margin: 0px !important;
}
.md\:grid-w70 {
width: calc(70% - 5px);
margin: 0px !important;
}
.md\:grid-w75 {
width: calc(75% - 5px);
margin: 0px !important;
}
.md\:grid-w80 {
width: calc(80% - 5px);
margin: 0px !important;
}
.md\:grid-w85 {
width: calc(85% - 5px);
margin: 0px !important;
}
.md\:grid-w90 {
width: calc(90% - 5px);
margin: 0px !important;
}
.md\:grid-w95 {
width: calc(95% - 5px);
margin: 0px !important;
}
.md\:grid-w100 {
width: calc(100% - 5px);
margin: 0px !important;
}
} }
@screen lg { @screen lg {
.lg\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; } .lg\:grid-w10 {
.lg\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; } width: calc(10% - 5px);
.lg\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; } margin: 0px !important;
.lg\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; } }
.lg\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; } .lg\:grid-w15 {
.lg\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; } width: calc(15% - 5px);
.lg\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; } margin: 0px !important;
.lg\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; } }
.lg\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; } .lg\:grid-w20 {
.lg\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; } width: calc(20% - 5px);
.lg\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; } margin: 0px !important;
.lg\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; } }
.lg\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; } .lg\:grid-w25 {
.lg\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; } width: calc(25% - 5px);
.lg\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; } margin: 0px !important;
.lg\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; } }
.lg\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; } .lg\:grid-w30 {
.lg\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; } width: calc(30% - 5px);
.lg\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; } margin: 0px !important;
.lg\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; } }
.lg\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; } .lg\:grid-w33 {
width: calc(33% - 5px);
margin: 0px !important;
}
.lg\:grid-w35 {
width: calc(35% - 5px);
margin: 0px !important;
}
.lg\:grid-w40 {
width: calc(40% - 5px);
margin: 0px !important;
}
.lg\:grid-w45 {
width: calc(45% - 5px);
margin: 0px !important;
}
.lg\:grid-w50 {
width: calc(50% - 5px);
margin: 0px !important;
}
.lg\:grid-w55 {
width: calc(55% - 5px);
margin: 0px !important;
}
.lg\:grid-w60 {
width: calc(60% - 5px);
margin: 0px !important;
}
.lg\:grid-w65 {
width: calc(65% - 5px);
margin: 0px !important;
}
.lg\:grid-w66 {
width: calc(66% - 5px);
margin: 0px !important;
}
.lg\:grid-w70 {
width: calc(70% - 5px);
margin: 0px !important;
}
.lg\:grid-w75 {
width: calc(75% - 5px);
margin: 0px !important;
}
.lg\:grid-w80 {
width: calc(80% - 5px);
margin: 0px !important;
}
.lg\:grid-w85 {
width: calc(85% - 5px);
margin: 0px !important;
}
.lg\:grid-w90 {
width: calc(90% - 5px);
margin: 0px !important;
}
.lg\:grid-w95 {
width: calc(95% - 5px);
margin: 0px !important;
}
.lg\:grid-w100 {
width: calc(100% - 5px);
margin: 0px !important;
}
} }
@screen xl { @screen xl {
.xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; } .xl\:grid-w10 {
.xl\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; } width: calc(10% - 5px);
.xl\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; } margin: 0px !important;
.xl\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; } }
.xl\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; } .xl\:grid-w15 {
.xl\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; } width: calc(15% - 5px);
.xl\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; } margin: 0px !important;
.xl\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; } }
.xl\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; } .xl\:grid-w20 {
.xl\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; } width: calc(20% - 5px);
.xl\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; } margin: 0px !important;
.xl\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; } }
.xl\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; } .xl\:grid-w25 {
.xl\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; } width: calc(25% - 5px);
.xl\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; } margin: 0px !important;
.xl\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; } }
.xl\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; } .xl\:grid-w30 {
.xl\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; } width: calc(30% - 5px);
.xl\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; } margin: 0px !important;
.xl\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; } }
.xl\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; } .xl\:grid-w33 {
width: calc(33% - 5px);
margin: 0px !important;
}
.xl\:grid-w35 {
width: calc(35% - 5px);
margin: 0px !important;
}
.xl\:grid-w40 {
width: calc(40% - 5px);
margin: 0px !important;
}
.xl\:grid-w45 {
width: calc(45% - 5px);
margin: 0px !important;
}
.xl\:grid-w50 {
width: calc(50% - 5px);
margin: 0px !important;
}
.xl\:grid-w55 {
width: calc(55% - 5px);
margin: 0px !important;
}
.xl\:grid-w60 {
width: calc(60% - 5px);
margin: 0px !important;
}
.xl\:grid-w65 {
width: calc(65% - 5px);
margin: 0px !important;
}
.xl\:grid-w66 {
width: calc(66% - 5px);
margin: 0px !important;
}
.xl\:grid-w70 {
width: calc(70% - 5px);
margin: 0px !important;
}
.xl\:grid-w75 {
width: calc(75% - 5px);
margin: 0px !important;
}
.xl\:grid-w80 {
width: calc(80% - 5px);
margin: 0px !important;
}
.xl\:grid-w85 {
width: calc(85% - 5px);
margin: 0px !important;
}
.xl\:grid-w90 {
width: calc(90% - 5px);
margin: 0px !important;
}
.xl\:grid-w95 {
width: calc(95% - 5px);
margin: 0px !important;
}
.xl\:grid-w100 {
width: calc(100% - 5px);
margin: 0px !important;
}
} }
@screen 2xl { @screen 2xl {
.2xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; } .2xl\:grid-w10 {
.2xl\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; } width: calc(10% - 5px);
.2xl\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; } margin: 0px !important;
.2xl\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; } }
.2xl\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; } .2xl\:grid-w15 {
.2xl\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; } width: calc(15% - 5px);
.2xl\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; } margin: 0px !important;
.2xl\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; } }
.2xl\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; } .2xl\:grid-w20 {
.2xl\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; } width: calc(20% - 5px);
.2xl\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; } margin: 0px !important;
.2xl\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; } }
.2xl\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; } .2xl\:grid-w25 {
.2xl\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; } width: calc(25% - 5px);
.2xl\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; } margin: 0px !important;
.2xl\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; } }
.2xl\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; } .2xl\:grid-w30 {
.2xl\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; } width: calc(30% - 5px);
.2xl\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; } margin: 0px !important;
.2xl\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; } }
.2xl\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; } .2xl\:grid-w33 {
width: calc(33% - 5px);
margin: 0px !important;
}
.2xl\:grid-w35 {
width: calc(35% - 5px);
margin: 0px !important;
}
.2xl\:grid-w40 {
width: calc(40% - 5px);
margin: 0px !important;
}
.2xl\:grid-w45 {
width: calc(45% - 5px);
margin: 0px !important;
}
.2xl\:grid-w50 {
width: calc(50% - 5px);
margin: 0px !important;
}
.2xl\:grid-w55 {
width: calc(55% - 5px);
margin: 0px !important;
}
.2xl\:grid-w60 {
width: calc(60% - 5px);
margin: 0px !important;
}
.2xl\:grid-w65 {
width: calc(65% - 5px);
margin: 0px !important;
}
.2xl\:grid-w66 {
width: calc(66% - 5px);
margin: 0px !important;
}
.2xl\:grid-w70 {
width: calc(70% - 5px);
margin: 0px !important;
}
.2xl\:grid-w75 {
width: calc(75% - 5px);
margin: 0px !important;
}
.2xl\:grid-w80 {
width: calc(80% - 5px);
margin: 0px !important;
}
.2xl\:grid-w85 {
width: calc(85% - 5px);
margin: 0px !important;
}
.2xl\:grid-w90 {
width: calc(90% - 5px);
margin: 0px !important;
}
.2xl\:grid-w95 {
width: calc(95% - 5px);
margin: 0px !important;
}
.2xl\:grid-w100 {
width: calc(100% - 5px);
margin: 0px !important;
}
} }
/* Carousel Specific Styles */ /* Carousel Specific Styles */
.ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ .ratio-16-9 {
.ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */ padding-top: 56.25%;
.ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */ } /* 16:9 Aspect Ratio */
.ratio-21-9 {
padding-top: 42.85%;
} /* 21:9 Aspect Ratio */
.ratio-32-9 {
padding-top: 28.125%;
} /* 32:9 Aspect Ratio */
@screen sm { @screen sm {
.sm\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ .sm\:ratio-16-9 {
.sm\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */ padding-top: 56.25%;
.sm\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */ } /* 16:9 Aspect Ratio */
.sm\:ratio-21-9 {
padding-top: 42.85%;
} /* 21:9 Aspect Ratio */
.sm\:ratio-32-9 {
padding-top: 28.125%;
} /* 32:9 Aspect Ratio */
} }
@screen md { @screen md {
.md\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ .md\:ratio-16-9 {
.md\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */ padding-top: 56.25%;
.md\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */ } /* 16:9 Aspect Ratio */
.md\:ratio-21-9 {
padding-top: 42.85%;
} /* 21:9 Aspect Ratio */
.md\:ratio-32-9 {
padding-top: 28.125%;
} /* 32:9 Aspect Ratio */
} }
@screen lg { @screen lg {
.lg\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ .lg\:ratio-16-9 {
.lg\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */ padding-top: 56.25%;
.lg\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */ } /* 16:9 Aspect Ratio */
.lg\:ratio-21-9 {
padding-top: 42.85%;
} /* 21:9 Aspect Ratio */
.lg\:ratio-32-9 {
padding-top: 28.125%;
} /* 32:9 Aspect Ratio */
} }
@screen xl { @screen xl {
.xl\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ .xl\:ratio-16-9 {
.xl\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */ padding-top: 56.25%;
.xl\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */ } /* 16:9 Aspect Ratio */
.xl\:ratio-21-9 {
padding-top: 42.85%;
} /* 21:9 Aspect Ratio */
.xl\:ratio-32-9 {
padding-top: 28.125%;
} /* 32:9 Aspect Ratio */
} }
@screen 2xl { @screen 2xl {
.2xl\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ .2xl\:ratio-16-9 {
.2xl\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */ padding-top: 56.25%;
.2xl\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */ } /* 16:9 Aspect Ratio */
.2xl\:ratio-21-9 {
padding-top: 42.85%;
} /* 21:9 Aspect Ratio */
.2xl\:ratio-32-9 {
padding-top: 28.125%;
} /* 32:9 Aspect Ratio */
} }
+2 -1
View File
@@ -1,4 +1,5 @@
:root { --color-neutral: 255, 255, 255; :root {
--color-neutral: 255, 255, 255;
--color-neutral-50: 255, 255, 255; --color-neutral-50: 255, 255, 255;
--color-neutral-100: 214, 251, 252; --color-neutral-100: 214, 251, 252;
--color-neutral-200: 142, 245, 247; --color-neutral-200: 142, 245, 247;
+2 -1
View File
@@ -1,4 +1,5 @@
:root { --color-neutral: 255, 255, 255; :root {
--color-neutral: 255, 255, 255;
--color-neutral-50: 255, 255, 255; --color-neutral-50: 255, 255, 255;
--color-neutral-100: 254, 197, 207; --color-neutral-100: 254, 197, 207;
--color-neutral-200: 253, 121, 144; --color-neutral-200: 253, 121, 144;
+2 -1
View File
@@ -1,4 +1,5 @@
:root { --color-neutral: 255, 255, 255; :root {
--color-neutral: 255, 255, 255;
--color-neutral-50: 255, 255, 255; --color-neutral-50: 255, 255, 255;
--color-neutral-100: 232, 238, 237; --color-neutral-100: 232, 238, 237;
--color-neutral-200: 188, 206, 203; --color-neutral-200: 188, 206, 203;
+2 -1
View File
@@ -1,4 +1,5 @@
:root { --color-neutral: 255, 255, 255; :root {
--color-neutral: 255, 255, 255;
--color-neutral-50: 255, 255, 255; --color-neutral-50: 255, 255, 255;
--color-neutral-100: 255, 255, 255; --color-neutral-100: 255, 255, 255;
--color-neutral-200: 201, 209, 244; --color-neutral-200: 201, 209, 244;
+2 -1
View File
@@ -1,4 +1,5 @@
:root { --color-neutral: 255, 255, 255; :root {
--color-neutral: 255, 255, 255;
--color-neutral-50: 255, 255, 255; --color-neutral-50: 255, 255, 255;
--color-neutral-100: 255, 255, 255; --color-neutral-100: 255, 255, 255;
--color-neutral-200: 218, 196, 249; --color-neutral-200: 218, 196, 249;
+2 -1
View File
@@ -1,4 +1,5 @@
:root { --color-neutral: 255, 255, 255; :root {
--color-neutral: 255, 255, 255;
--color-neutral-50: 255, 255, 255; --color-neutral-50: 255, 255, 255;
--color-neutral-100: 255, 255, 255; --color-neutral-100: 255, 255, 255;
--color-neutral-200: 214, 219, 222; --color-neutral-200: 214, 219, 222;
+2 -1
View File
@@ -1,4 +1,5 @@
:root { --color-neutral: 255, 255, 255; :root {
--color-neutral: 255, 255, 255;
--color-neutral-50: 255, 255, 255; --color-neutral-50: 255, 255, 255;
--color-neutral-100: 238, 232, 238; --color-neutral-100: 238, 232, 238;
--color-neutral-200: 206, 188, 206; --color-neutral-200: 206, 188, 206;
+2 -1
View File
@@ -1,4 +1,5 @@
:root { --color-neutral: 255, 255, 255; :root {
--color-neutral: 255, 255, 255;
--color-neutral-50: 203, 255, 227; --color-neutral-50: 203, 255, 227;
--color-neutral-100: 126, 255, 186; --color-neutral-100: 126, 255, 186;
--color-neutral-200: 49, 255, 145; --color-neutral-200: 49, 255, 145;
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License -https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M311 196.8v81.3c0 2.1-1.6 3.7-3.7 3.7h-13c-1.3 0-2.4-.7-3-1.5l-37.3-50.3v48.2c0 2.1-1.6 3.7-3.7 3.7h-13c-2.1 0-3.7-1.6-3.7-3.7V196.9c0-2.1 1.6-3.7 3.7-3.7h12.9c1.1 0 2.4 .6 3 1.6l37.3 50.3V196.9c0-2.1 1.6-3.7 3.7-3.7h13c2.1-.1 3.8 1.6 3.8 3.5zm-93.7-3.7h-13c-2.1 0-3.7 1.6-3.7 3.7v81.3c0 2.1 1.6 3.7 3.7 3.7h13c2.1 0 3.7-1.6 3.7-3.7V196.8c0-1.9-1.6-3.7-3.7-3.7zm-31.4 68.1H150.3V196.8c0-2.1-1.6-3.7-3.7-3.7h-13c-2.1 0-3.7 1.6-3.7 3.7v81.3c0 1 .3 1.8 1 2.5c.7 .6 1.5 1 2.5 1h52.2c2.1 0 3.7-1.6 3.7-3.7v-13c0-1.9-1.6-3.7-3.5-3.7zm193.7-68.1H327.3c-1.9 0-3.7 1.6-3.7 3.7v81.3c0 1.9 1.6 3.7 3.7 3.7h52.2c2.1 0 3.7-1.6 3.7-3.7V265c0-2.1-1.6-3.7-3.7-3.7H344V247.7h35.5c2.1 0 3.7-1.6 3.7-3.7V230.9c0-2.1-1.6-3.7-3.7-3.7H344V213.5h35.5c2.1 0 3.7-1.6 3.7-3.7v-13c-.1-1.9-1.7-3.7-3.7-3.7zM512 93.4V419.4c-.1 51.2-42.1 92.7-93.4 92.6H92.6C41.4 511.9-.1 469.8 0 418.6V92.6C.1 41.4 42.2-.1 93.4 0H419.4c51.2 .1 92.7 42.1 92.6 93.4zM441.6 233.5c0-83.4-83.7-151.3-186.4-151.3s-186.4 67.9-186.4 151.3c0 74.7 66.3 137.4 155.9 149.3c21.8 4.7 19.3 12.7 14.4 42.1c-.8 4.7-3.8 18.4 16.1 10.1s107.3-63.2 146.5-108.2c27-29.7 39.9-59.8 39.9-93.1z" /></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

+5
View File
@@ -0,0 +1,5 @@
<svg width="592" height="592" viewBox="0 0 592 592" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M46 260.286L292.269 46L546 260.286" stroke="currentColor" stroke-width="91" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M46 447.786L292.269 233.5L546 447.786" stroke="currentColor" stroke-width="91" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M293.619 407.607V546" stroke="currentColor" stroke-width="91" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 486 B

+15
View File
@@ -0,0 +1,15 @@
function setBackgroundBlur() {
const scriptElement = document.currentScript;
const targetId =
scriptElement && scriptElement.getAttribute("data-target-id")
? scriptElement.getAttribute("data-target-id")
: (console.error("data-target-id is null"), null);
window.addEventListener("scroll", () => {
const scroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
const backgroundBlur = document.getElementById(targetId);
backgroundBlur.style.opacity = scroll / 300;
});
}
setBackgroundBlur();
+6 -2
View File
@@ -1,6 +1,10 @@
var scriptBundle = document.getElementById("script-bundle"); var scriptBundle = document.getElementById("script-bundle");
var copyText = scriptBundle && scriptBundle.getAttribute("data-copy")? scriptBundle.getAttribute("data-copy") : "Copy"; var copyText =
var copiedText = scriptBundle && scriptBundle.getAttribute("data-copied")? scriptBundle.getAttribute("data-copied") : "Copied"; scriptBundle && scriptBundle.getAttribute("data-copy") ? scriptBundle.getAttribute("data-copy") : "Copy";
var copiedText =
scriptBundle && scriptBundle.getAttribute("data-copied")
? scriptBundle.getAttribute("data-copied")
: "Copied";
function createCopyButton(highlightDiv) { function createCopyButton(highlightDiv) {
const button = document.createElement("button"); const button = document.createElement("button");
+36
View File
@@ -0,0 +1,36 @@
function fetchRepo() {
const scriptElement = document.currentScript;
const repoURL =
scriptElement && scriptElement.getAttribute("data-repo-url")
? scriptElement.getAttribute("data-repo-url")
: (console.error("data-repo-url is null"), null);
const repoId =
scriptElement && scriptElement.getAttribute("data-repo-id")
? scriptElement.getAttribute("data-repo-id")
: (console.error("data-repo-id is null"), null);
const requestObjects = repoId.startsWith("github")
? ["full_name", "description", "stargazers_count", "forks"]
: repoId.startsWith("gitlab")
? ["name_with_namespace", "description", "star_count", "forks_count"]
: ["full_name", "description", "stars_count", "forks_count"];
fetch(repoURL, {
headers: new Headers({
"User-agent": "Mozilla/4.0 Custom User Agent",
}),
})
.then((response) => response.json())
.then((data) => {
requestObjects.forEach((requestObject) => {
let element = document.getElementById(`${repoId}-${requestObject}`);
if (requestObject === "stargazers_count" && repoId.startsWith("github")) {
element = document.getElementById(`${repoId}-stargazers`);
}
element
? (element.innerHTML = data[requestObject])
: (console.error(`Element '${repoId}-${requestObject}' not found`), null);
});
})
.catch((error) => console.error(error));
}
fetchRepo();
+8 -8
View File
@@ -4,16 +4,16 @@ var menuWrapper = document.getElementById("menu-wrapper");
var menuOpen = false; var menuOpen = false;
var openMenu = function (e) { var openMenu = function () {
if (!menuOpen) { if (!menuOpen) {
menuOpen = true; menuOpen = true;
document.body.style.overflowY = "hidden"; document.body.style.overflowY = "hidden";
menuButton.style.visibility = "hidden"; menuButton.style.visibility = "hidden";
menuWrapper.style.visibility = "visible"; menuWrapper.style.visibility = "visible";
menuWrapper.style.opacity = "1"; menuWrapper.style.opacity = "1";
window.onbeforeunload = function (event) { window.onbeforeunload = function () {
closeMenu() closeMenu();
} };
} }
}; };
@@ -24,10 +24,10 @@ var closeMenu = function (e) {
menuButton.style.visibility = "visible"; menuButton.style.visibility = "visible";
menuWrapper.style.visibility = "hidden"; menuWrapper.style.visibility = "hidden";
menuWrapper.style.opacity = "0"; menuWrapper.style.opacity = "0";
window.onbeforeunload = function (event) { } window.onbeforeunload = function () {};
e.stopPropagation(); e.stopPropagation();
} }
} };
menuButton.addEventListener("click", openMenu); menuButton && menuButton.addEventListener("click", openMenu);
menuCloseButton.addEventListener("click", closeMenu); menuCloseButton && menuCloseButton.addEventListener("click", closeMenu);
+77 -52
View File
@@ -1,106 +1,131 @@
var liked_page = false const pageScriptElement = document.currentScript;
var id = oid ? oid.replaceAll("/", "-") : oid const oid =
var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes pageScriptElement && pageScriptElement.getAttribute("data-oid")
? pageScriptElement.getAttribute("data-oid")
: (console.error("data-oid is null"), null);
const oid_likes =
pageScriptElement && pageScriptElement.getAttribute("data-oid-likes")
? pageScriptElement.getAttribute("data-oid-likes")
: (console.error("data-oid-likes is null"), null);
const liked_page = false;
const id = oid ? oid.replaceAll("/", "-") : oid;
const id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes;
if (typeof auth !== 'undefined') { if (typeof auth !== "undefined") {
const viewed = localStorage.getItem(id);
var viewed = localStorage.getItem(id);
if (!viewed) { if (!viewed) {
auth.signInAnonymously() auth
.signInAnonymously()
.then(() => { .then(() => {
var docRef = db.collection('views').doc(id) const docRef = db.collection("views").doc(id);
localStorage.setItem(id, true); localStorage.setItem(id, true);
docRef.get().then((doc) => { docRef
.get()
.then((doc) => {
if (doc.exists) { if (doc.exists) {
db.collection('views').doc(id).update({ db.collection("views")
views: firebase.firestore.FieldValue.increment(1) .doc(id)
.update({
views: firebase.firestore.FieldValue.increment(1),
}); });
} else { } else {
db.collection('views').doc(id).set({ views: 1 }) db.collection("views").doc(id).set({ views: 1 });
} }
}).catch((error) => { })
.catch((error) => {
console.log("Error getting document:", error); console.log("Error getting document:", error);
}); });
}) })
.catch((error) => { .catch((error) => {
var errorCode = error.code; const errorCode = error.code;
var errorMessage = error.message; const errorMessage = error.message;
console.error(errorCode, errorMessage) console.error(errorCode, errorMessage);
}); });
} }
var liked = localStorage.getItem(id_likes); const liked = localStorage.getItem(id_likes);
if (liked) { if (liked) {
liked_page = true liked_page = true;
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "" document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "";
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none" document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none";
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "" document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "";
} }
} }
function like_article(id_likes) { function like_article(id_likes) {
auth.signInAnonymously() auth
.signInAnonymously()
.then(() => { .then(() => {
var docRef = db.collection('likes').doc(id_likes) const docRef = db.collection("likes").doc(id_likes);
docRef.get().then((doc) => { docRef
liked_page = true .get()
.then((doc) => {
liked_page = true;
localStorage.setItem(id_likes, true); localStorage.setItem(id_likes, true);
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "" document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "";
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none" document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none";
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "" document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "";
if (doc.exists) { if (doc.exists) {
db.collection('likes').doc(id_likes).update({ db.collection("likes")
likes: firebase.firestore.FieldValue.increment(1) .doc(id_likes)
.update({
likes: firebase.firestore.FieldValue.increment(1),
}); });
} else { } else {
db.collection('likes').doc(id_likes).set({ likes: 1 }) db.collection("likes").doc(id_likes).set({ likes: 1 });
} }
}).catch((error) => { })
.catch((error) => {
console.log("Error getting document:", error); console.log("Error getting document:", error);
}); });
}) })
.catch((error) => { .catch((error) => {
var errorCode = error.code; const errorCode = error.code;
var errorMessage = error.message; const errorMessage = error.message;
console.error(errorCode, errorMessage) console.error(errorCode, errorMessage);
}); });
} }
function remove_like_article(id_likes) { function remove_like_article(id_likes) {
auth.signInAnonymously() auth
.signInAnonymously()
.then(() => { .then(() => {
var docRef = db.collection('likes').doc(id_likes) const docRef = db.collection("likes").doc(id_likes);
docRef.get().then((doc) => { docRef
liked_page = false .get()
.then((doc) => {
liked_page = false;
localStorage.removeItem(id_likes); localStorage.removeItem(id_likes);
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "none" document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "none";
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "" document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "";
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "\xa0Like" document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "\xa0Like";
if (doc.exists) { if (doc.exists) {
db.collection('likes').doc(id_likes).update({ db.collection("likes")
likes: firebase.firestore.FieldValue.increment(-1) .doc(id_likes)
.update({
likes: firebase.firestore.FieldValue.increment(-1),
}); });
} else { } else {
db.collection('likes').doc(id_likes).set({ likes: 0 }) db.collection("likes").doc(id_likes).set({ likes: 0 });
} }
}).catch((error) => { })
.catch((error) => {
console.log("Error getting document:", error); console.log("Error getting document:", error);
}); });
}) })
.catch((error) => { .catch((error) => {
var errorCode = error.code; const errorCode = error.code;
var errorMessage = error.message; const errorMessage = error.message;
console.error(errorCode, errorMessage) console.error(errorCode, errorMessage);
}); });
} }
function process_article() { function process_article() {
if (!liked_page) { if (!liked_page) {
like_article(id_likes) like_article(id_likes);
} else { } else {
remove_like_article(id_likes) remove_like_article(id_likes);
} }
} }
+29 -30
View File
@@ -1,71 +1,70 @@
if (typeof auth !== 'undefined') { if (typeof auth !== "undefined") {
var viewsCollection = db.collection('views'); var viewsCollection = db.collection("views");
var likesCollection = db.collection('likes'); var likesCollection = db.collection("likes");
function numberWithCommas(x) { function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
} }
function toggleLoaders(node) { function toggleLoaders(node) {
var classesString = node.className; var classesString = node.className;
if(classesString == "") return if (classesString == "") return;
var classes = classesString.split(" "); var classes = classesString.split(" ");
for (var i in classes) { for (var i in classes) {
node.classList.toggle(classes[i]) node.classList.toggle(classes[i]);
} }
} }
var update_views = function (node, id) { var update_views = function (node, id) {
viewsCollection.doc(id).onSnapshot(doc => { viewsCollection.doc(id).onSnapshot((doc) => {
var data = doc.data(); var data = doc.data();
if (data) { if (data) {
node.innerText = numberWithCommas(data.views) node.innerText = numberWithCommas(data.views);
} else { } else {
node.innerText = 0 node.innerText = 0;
}
toggleLoaders(node)
})
} }
toggleLoaders(node);
});
};
var update_likes = function (node, id) { var update_likes = function (node, id) {
likesCollection.doc(id).onSnapshot(doc => { likesCollection.doc(id).onSnapshot((doc) => {
var data = doc.data(); var data = doc.data();
if (data) { if (data) {
node.innerText = numberWithCommas(data.likes) node.innerText = numberWithCommas(data.likes);
} else { } else {
node.innerText = 0 node.innerText = 0;
} }
toggleLoaders(node) toggleLoaders(node);
});
};
}) auth
} .signInAnonymously()
auth.signInAnonymously()
.then(() => { .then(() => {
var views_nodes = document.querySelectorAll("span[id^='views_']") var views_nodes = document.querySelectorAll("span[id^='views_']");
for (var i in views_nodes) { for (var i in views_nodes) {
var node = views_nodes[i] var node = views_nodes[i];
var id = node.id ? node.id.replaceAll("/", "-") : node.id var id = node.id ? node.id.replaceAll("/", "-") : node.id;
if (id) { if (id) {
update_views(node, id) update_views(node, id);
} }
} }
var likes_nodes = document.querySelectorAll("span[id^='likes_']") var likes_nodes = document.querySelectorAll("span[id^='likes_']");
for (var i in likes_nodes) { for (var i in likes_nodes) {
var node = likes_nodes[i] var node = likes_nodes[i];
var id = node.id ? node.id.replaceAll("/", "-") : node.id var id = node.id ? node.id.replaceAll("/", "-") : node.id;
if (id) { if (id) {
update_likes(node, id) update_likes(node, id);
} }
} }
}) })
.catch((error) => { .catch((error) => {
var errorCode = error.code; var errorCode = error.code;
var errorMessage = error.message; var errorMessage = error.message;
console.error(errorCode, errorMessage) console.error(errorCode, errorMessage);
}); });
} }
+13 -10
View File
@@ -25,12 +25,9 @@ modal.addEventListener("click", function (event) {
document.addEventListener("keydown", function (event) { document.addEventListener("keydown", function (event) {
// Forward slash to open search wrapper // Forward slash to open search wrapper
if (event.key == "/") { if (event.key == "/") {
const active = document.activeElement const active = document.activeElement;
const tag = active.tagName const tag = active.tagName;
const isInputField = const isInputField = tag === "INPUT" || tag === "TEXTAREA" || active.isContentEditable;
tag === "INPUT" ||
tag === "TEXTAREA" ||
active.isContentEditable
if (!searchVisible && !isInputField) { if (!searchVisible && !isInputField) {
event.preventDefault(); event.preventDefault();
@@ -82,7 +79,6 @@ document.addEventListener("keydown", function (event) {
} }
} }
} }
}); });
// Update search on each keypress // Update search on each keypress
@@ -129,7 +125,7 @@ function fetchJSON(path, callback) {
function buildIndex() { function buildIndex() {
var baseURL = wrapper.getAttribute("data-url"); var baseURL = wrapper.getAttribute("data-url");
baseURL = baseURL.replace(/\/?$/, '/'); baseURL = baseURL.replace(/\/?$/, "/");
fetchJSON(baseURL + "index.json", function (data) { fetchJSON(baseURL + "index.json", function (data) {
var options = { var options = {
shouldSort: true, shouldSort: true,
@@ -165,8 +161,15 @@ function executeQuery(term) {
var div = document.createElement("div"); var div = document.createElement("div");
div.innerHTML = html; div.innerHTML = html;
value.item.summary = div.textContent || div.innerText || ""; value.item.summary = div.textContent || div.innerText || "";
var title = value.item.externalUrl? value.item.title + '<span class="text-xs ml-2 align-center cursor-default text-neutral-400 dark:text-neutral-500">'+value.item.externalUrl+'</span>' : value.item.title; var title = value.item.externalUrl
var linkconfig = value.item.externalUrl? 'target="_blank" rel="noopener" href="'+value.item.externalUrl+'"' : 'href="'+value.item.permalink+'"'; ? value.item.title +
'<span class="text-xs ml-2 align-center cursor-default text-neutral-400 dark:text-neutral-500">' +
value.item.externalUrl +
"</span>"
: value.item.title;
var linkconfig = value.item.externalUrl
? 'target="_blank" rel="noopener" href="' + value.item.externalUrl + '"'
: 'href="' + value.item.permalink + '"';
resultsHTML = resultsHTML =
resultsHTML + resultsHTML +
`<li class="mb-2"> `<li class="mb-2">
+3 -4
View File
@@ -2,17 +2,16 @@ function _getDefaultPackeryOptions() {
return { return {
percentPosition: true, percentPosition: true,
gutter: 5, gutter: 5,
resize: true resize: true,
}; };
} }
(function init() { (function init() {
$(window).on("load", function () { $(window).on("load", function () {
let packeries = []; let packeries = [];
let nodeGalleries = document.querySelectorAll('.gallery'); let nodeGalleries = document.querySelectorAll(".gallery");
nodeGalleries.forEach(nodeGallery => { nodeGalleries.forEach((nodeGallery) => {
// TODO : implement a reader of Packery configuration _getPackeryOptions; for example by reading data-attribute // TODO : implement a reader of Packery configuration _getPackeryOptions; for example by reading data-attribute
let packery = new Packery(nodeGallery, _getDefaultPackeryOptions()); let packery = new Packery(nodeGallery, _getDefaultPackeryOptions());
packeries.push(packery); packeries.push(packery);
+23 -26
View File
@@ -1,53 +1,50 @@
function _toogleZenMode(zendModeButton) { function _toogleZenMode(zendModeButton) {
// Nodes selection // Nodes selection
const body = document.querySelector('body'); const body = document.querySelector("body");
const footer = document.querySelector('footer'); const footer = document.querySelector("footer");
const tocRight = document.querySelector('.toc-right'); const tocRight = document.querySelector(".toc-right");
const tocInside = document.querySelector('.toc-inside'); const tocInside = document.querySelector(".toc-inside");
const articleContent = document.querySelector('.article-content'); const articleContent = document.querySelector(".article-content");
const header = document.querySelector('#single_header'); const header = document.querySelector("#single_header");
// Add semantic class into body tag // Add semantic class into body tag
body.classList.toggle('zen-mode-enable'); body.classList.toggle("zen-mode-enable");
// Show/Hide 'toc right' and 'toc inside' // Show/Hide 'toc right' and 'toc inside'
if (tocRight) if (tocRight) tocRight.classList.toggle("lg:block");
tocRight.classList.toggle('lg:block'); if (tocInside) tocInside.classList.toggle("lg:hidden");
if (tocInside)
tocInside.classList.toggle('lg:hidden');
// Change width of article content // Change width of article content
articleContent.classList.toggle('max-w-fit'); articleContent.classList.toggle("max-w-fit");
articleContent.classList.toggle('max-w-prose'); articleContent.classList.toggle("max-w-prose");
// Change width of article title and footer // Change width of article title and footer
header.classList.toggle('max-w-full'); header.classList.toggle("max-w-full");
header.classList.toggle('max-w-prose'); header.classList.toggle("max-w-prose");
footer.classList.toggle('max-w-full'); footer.classList.toggle("max-w-full");
footer.classList.toggle('max-w-prose'); footer.classList.toggle("max-w-prose");
// Read i18n title from data-attributes // Read i18n title from data-attributes
const titleI18nDisable = zendModeButton.getAttribute('data-title-i18n-disable'); const titleI18nDisable = zendModeButton.getAttribute("data-title-i18n-disable");
const titleI18nEnable = zendModeButton.getAttribute('data-title-i18n-enable'); const titleI18nEnable = zendModeButton.getAttribute("data-title-i18n-enable");
if (body.classList.contains('zen-mode-enable')) { if (body.classList.contains("zen-mode-enable")) {
// Persist configuration // Persist configuration
//localStorage.setItem('blowfish-zen-mode-enabled', 'true'); //localStorage.setItem('blowfish-zen-mode-enabled', 'true');
// Change title to enable // Change title to enable
zendModeButton.setAttribute('title', titleI18nEnable) zendModeButton.setAttribute("title", titleI18nEnable);
// Auto-scroll to title article // Auto-scroll to title article
window.scrollTo(window.scrollX, header.getBoundingClientRect().top - 90); window.scrollTo(window.scrollX, header.getBoundingClientRect().top - 90);
} else { } else {
//localStorage.setItem('blowfish-zen-mode-enabled', 'false'); //localStorage.setItem('blowfish-zen-mode-enabled', 'false');
zendModeButton.setAttribute('title', titleI18nDisable); zendModeButton.setAttribute("title", titleI18nDisable);
document.querySelector('body').scrollIntoView(); document.querySelector("body").scrollIntoView();
} }
} }
function _registerZendModeButtonClick(zendModeButton) { function _registerZendModeButtonClick(zendModeButton) {
zendModeButton.addEventListener('click', function (event) { zendModeButton.addEventListener("click", function (event) {
event.preventDefault(); event.preventDefault();
// Toggle zen-mode // Toggle zen-mode
@@ -58,7 +55,7 @@ function _registerZendModeButtonClick(zendModeButton) {
(function init() { (function init() {
window.addEventListener("DOMContentLoaded", (event) => { window.addEventListener("DOMContentLoaded", (event) => {
// Register click on 'zen-mode-button' node element // Register click on 'zen-mode-button' node element
const zendModeButton = document.getElementById('zen-mode-button'); const zendModeButton = document.getElementById("zen-mode-button");
if (zendModeButton !== null && zendModeButton !== undefined) { if (zendModeButton !== null && zendModeButton !== undefined) {
_registerZendModeButtonClick(zendModeButton); _registerZendModeButtonClick(zendModeButton);
} }
+1 -1
View File
@@ -2,4 +2,4 @@
[module.hugoVersion] [module.hugoVersion]
extended = true extended = true
min = "0.137.0" min = "0.137.0"
max = "0.147.5" max = "0.147.8"
-9
View File
@@ -67,12 +67,3 @@ enableEmoji = true
name = 'fragmentrefs' name = 'fragmentrefs'
type = 'fragments' type = 'fragments'
weight = 10 weight = 10
[markup]
[markup.goldmark]
[markup.goldmark.extensions]
[markup.goldmark.extensions.passthrough]
enable = true
[markup.goldmark.extensions.passthrough.delimiters]
block = [['\[', '\]'], ['$$', '$$']]
inline = [['\(', '\)']]
+7
View File
@@ -5,6 +5,13 @@
[goldmark.renderer] [goldmark.renderer]
unsafe = true unsafe = true
[goldmark.extensions]
[goldmark.extensions.passthrough]
enable = true
[goldmark.extensions.passthrough.delimiters]
block = [['\[', '\]'], ['$$', '$$']]
inline = [['\(', '\)']]
[highlight] [highlight]
noClasses = false noClasses = false
+8 -1
View File
@@ -18,6 +18,7 @@ replyByEmail = false
# robots = "" # robots = ""
disableImageOptimization = false disableImageOptimization = false
disableImageOptimizationMD = false
disableTextInHeader = false disableTextInHeader = false
# backgroundImageWidth = 1200 # backgroundImageWidth = 1200
@@ -29,6 +30,8 @@ disableTextInHeader = false
# smartTOC = true # smartTOC = true
# smartTOCHideUnfocusedChildren = true # smartTOCHideUnfocusedChildren = true
fingerprintAlgorithm = "sha512" # Valid values are "sha512" (default), "sha384", "sha256"
giteaDefaultServer = "https://git.fsfe.org" giteaDefaultServer = "https://git.fsfe.org"
forgejoDefaultServer = "https://v8.next.forgejo.org" forgejoDefaultServer = "https://v8.next.forgejo.org"
@@ -52,6 +55,7 @@ forgejoDefaultServer = "https://v8.next.forgejo.org"
cardView = false cardView = false
cardViewScreenWidth = false cardViewScreenWidth = false
layoutBackgroundBlur = false # only used when layout equals background layoutBackgroundBlur = false # only used when layout equals background
disableHeroImageFilter = false # only used when layout equals hero
[article] [article]
showDate = true showDate = true
@@ -82,7 +86,7 @@ forgejoDefaultServer = "https://v8.next.forgejo.org"
showCategoryOnly = false # use showTaxonomies OR showCategoryOnly, not both showCategoryOnly = false # use showTaxonomies OR showCategoryOnly, not both
showAuthorsBadges = false showAuthorsBadges = false
showWordCount = true showWordCount = true
# sharingLinks = [ "linkedin", "twitter", "bluesky", "mastodon", "reddit", "pinterest", "facebook", "email", "whatsapp", "telegram"] # sharingLinks = [ "linkedin", "twitter", "bluesky", "mastodon", "reddit", "pinterest", "facebook", "email", "whatsapp", "telegram", "line"]
showZenMode = false showZenMode = false
[list] [list]
@@ -167,3 +171,6 @@ forgejoDefaultServer = "https://v8.next.forgejo.org"
[rssnext] [rssnext]
# feedId = "" # feedId = ""
# userId = "" # userId = ""
[advertisement]
# adsense = ""
+5
View File
@@ -9,6 +9,11 @@
"title": "sharing.facebook", "title": "sharing.facebook",
"url": "https://www.facebook.com/sharer/sharer.php?u=%s&quote=%s" "url": "https://www.facebook.com/sharer/sharer.php?u=%s&quote=%s"
}, },
"line": {
"icon": "line",
"title": "sharing.line",
"url": "https://line.me/R/share?text=%s%%20%s"
},
"linkedin": { "linkedin": {
"icon": "linkedin", "icon": "linkedin",
"title": "sharing.linkedin", "title": "sharing.linkedin",
+18 -32
View File
@@ -1,20 +1,13 @@
var layouts = [ var layouts = ["background", "hero", "profile", "page", "card"];
"background",
"hero",
"profile",
"page",
"card"
]
var currentLayout = 0 var currentLayout = 0;
function switchHomeLayout() { function switchHomeLayout() {
var old = currentLayout;
currentLayout = currentLayout == layouts.length - 1 ? 0 : currentLayout + 1;
var old = currentLayout var oldDiv = document.getElementById(layouts[old]);
currentLayout = currentLayout == layouts.length - 1 ? 0 : currentLayout + 1 var currentDiv = document.getElementById(layouts[currentLayout]);
var oldDiv = document.getElementById(layouts[old])
var currentDiv = document.getElementById(layouts[currentLayout])
const layoutCode = document.querySelectorAll("code[id=layout]"); const layoutCode = document.querySelectorAll("code[id=layout]");
currentDiv.style.display = "block"; currentDiv.style.display = "block";
@@ -22,7 +15,6 @@ function switchHomeLayout() {
layoutCode.forEach(function (el) { layoutCode.forEach(function (el) {
el.innerText = layouts[currentLayout]; el.innerText = layouts[currentLayout];
}); });
} }
window.addEventListener("DOMContentLoaded", (event) => { window.addEventListener("DOMContentLoaded", (event) => {
@@ -30,31 +22,26 @@ window.addEventListener("DOMContentLoaded", (event) => {
button.addEventListener("click", function (e) { button.addEventListener("click", function (e) {
e.preventDefault(); e.preventDefault();
switchHomeLayout(); switchHomeLayout();
}) }),
); );
}); });
var list_config = [ var list_config = ["CardViewProse", "CardViewScreenWidth", "NormalView"];
"CardViewProse",
"CardViewScreenWidth",
"NormalView"
]
var titles = { var titles = {
"CardViewProse" : "card view with constrained width", CardViewProse: "card view with constrained width",
"CardViewScreenWidth" : "card view with full width", CardViewScreenWidth: "card view with full width",
"NormalView" : "standard list view" NormalView: "standard list view",
} };
var currentConfig = 0 var currentConfig = 0;
function switchList() { function switchList() {
var old = currentConfig;
currentConfig = currentConfig == list_config.length - 1 ? 0 : currentConfig + 1;
var old = currentConfig var oldDiv = document.getElementById(list_config[old]);
currentConfig = currentConfig == list_config.length - 1 ? 0 : currentConfig + 1 var currentDiv = document.getElementById(list_config[currentConfig]);
var oldDiv = document.getElementById(list_config[old])
var currentDiv = document.getElementById(list_config[currentConfig])
const configCode = document.querySelectorAll("code[id=config]"); const configCode = document.querySelectorAll("code[id=config]");
currentDiv.style.display = "block"; currentDiv.style.display = "block";
@@ -63,7 +50,6 @@ function switchList() {
configCode.forEach(function (el) { configCode.forEach(function (el) {
el.innerText = titles[list_config[currentConfig]]; el.innerText = titles[list_config[currentConfig]];
}); });
} }
window.addEventListener("DOMContentLoaded", (event) => { window.addEventListener("DOMContentLoaded", (event) => {
@@ -71,6 +57,6 @@ window.addEventListener("DOMContentLoaded", (event) => {
button.addEventListener("click", function (e) { button.addEventListener("click", function (e) {
e.preventDefault(); e.preventDefault();
switchList(); switchList();
}) }),
); );
}); });
+11 -3
View File
@@ -70,11 +70,19 @@ googleAnalytics = "G-PEDMYR1V0K"
type = 'fragments' type = 'fragments'
weight = 10 weight = 10
# Render only specific parts of the site for faster development. Use: hugo --renderSegments site_core # Render only specific parts of the site for faster development.
# Note that there are more files are ignored in development/hugo.toml
#
# Usage: `hugo --renderSegments core` or `hugo --renderSegments core,en_only`
[segments] [segments]
[segments.site_core] [segments.core]
[[segments.site_core.includes]] [[segments.core.includes]]
# Debug core pages
path = '{/,/docs,/docs/**,/samples,/samples/**}' path = '{/,/docs,/docs/**,/samples,/samples/**}'
[segments.en_only] [segments.en_only]
[[segments.en_only.includes]] [[segments.en_only.includes]]
# Alternatively, you can use environment variable
# - UNIX: HUGO_DISABLELANGUAGES='it ja zh-cn' npm run example:core
# - Windows CMD: set "HUGO_DISABLELANGUAGES=it ja zh-cn" && npm run example:core
# - Windows PowerShell: $env:HUGO_DISABLELANGUAGES="it ja zh-cn"; npm run example:core
lang = 'en' lang = 'en'
+7
View File
@@ -5,6 +5,13 @@
[goldmark.renderer] [goldmark.renderer]
unsafe = true unsafe = true
[goldmark.extensions]
[goldmark.extensions.passthrough]
enable = true
[goldmark.extensions.passthrough.delimiters]
block = [['\[', '\]'], ['$$', '$$']]
inline = [['\(', '\)']]
[highlight] [highlight]
noClasses = false noClasses = false
+12 -3
View File
@@ -30,6 +30,11 @@ highlightCurrentMenuArea = true
smartTOC = true smartTOC = true
smartTOCHideUnfocusedChildren = false smartTOCHideUnfocusedChildren = false
# giteaDefaultServer = "https://git.fsfe.org"
# forgejoDefaultServer = "https://v8.next.forgejo.org"
fingerprintAlgorithm = "sha512" # Valid values are "sha512" (default), "sha384", "sha256"
[header] [header]
layout = "fixed" # valid options: basic, fixed, fixed-fill, fixed-gradient, fixed-fill-blur layout = "fixed" # valid options: basic, fixed, fixed-fill, fixed-gradient, fixed-fill-blur
@@ -44,7 +49,7 @@ smartTOCHideUnfocusedChildren = false
layout = "custom" # valid options: page, profile, hero, card, background, custom layout = "custom" # valid options: page, profile, hero, card, background, custom
# homepageImage = "/img/iceland.jpg" # used in: hero, and card # homepageImage = "/img/iceland.jpg" # used in: hero, and card
showRecent = false showRecent = false
showRecentItems = 6 showRecentItems = 12
showMoreLink = true showMoreLink = true
showMoreLinkDest = "docs" showMoreLinkDest = "docs"
cardView = true cardView = true
@@ -63,6 +68,7 @@ smartTOCHideUnfocusedChildren = false
showHero = true showHero = true
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
layoutBackgroundBlur = true # only used when heroStyle equals background layoutBackgroundBlur = true # only used when heroStyle equals background
layoutBackgroundHeaderSpace = true # only used when heroStyle equals background
showBreadcrumbs = true showBreadcrumbs = true
showDraftLabel = true showDraftLabel = true
showEdit = true showEdit = true
@@ -75,11 +81,11 @@ smartTOCHideUnfocusedChildren = false
showReadingTime = true showReadingTime = true
showTableOfContents = true showTableOfContents = true
showRelatedContent = true showRelatedContent = true
relatedContentLimit = 6 relatedContentLimit = 9
showTaxonomies = true showTaxonomies = true
showAuthorsBadges = true showAuthorsBadges = true
showWordCount = false showWordCount = false
sharingLinks = [ "linkedin", "twitter", "bluesky", "reddit", "whatsapp", "telegram", "pinterest", "facebook", "email"] sharingLinks = [ "linkedin", "twitter", "bluesky", "reddit", "whatsapp", "telegram", "pinterest", "facebook", "email", "line"]
showZenMode = true showZenMode = true
[list] [list]
@@ -163,3 +169,6 @@ smartTOCHideUnfocusedChildren = false
[rssnext] [rssnext]
# feedId = "" # feedId = ""
# userId = "" # userId = ""
[advertisement]
# adsense = ""
@@ -91,6 +91,7 @@ Il tema attualmente supporta le seguenti lingue per impostazione predefinita:
| Portuguese (Portugal) | `pt-pt` | | Portuguese (Portugal) | `pt-pt` |
| Romanian | `ro` | | Romanian | `ro` |
| Russian | `ru` | | Russian | `ru` |
| Thai | `th` |
| Turkish | `tr` | | Turkish | `tr` |
| Vietnamese | `vi` | | Vietnamese | `vi` |
| Ukrainian | `uk` | | Ukrainian | `uk` |
@@ -186,6 +187,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected | | `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected |
| `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | | `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. |
| `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | | `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. |
| `fingerprintAlgorithm` | `"sha512"` | This configures the fingerprint or resources.Fingerprint used in .Data.Integrity for files provided by the theme. Valid values are `sha512` (default), `sha384`, `sha256` |
### Header ### Header
@@ -250,7 +252,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `article.showAuthorsBadges` | `false` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. | | `article.showAuthorsBadges` | `false` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. |
| `article.showWordCount` | `false` | Whether or not article word counts are displayed. | | `article.showWordCount` | `false` | Whether or not article word counts are displayed. |
| `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. | | `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. |
| `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. Available values are: "linkedin", "bluesky", "mastodon", "twitter", "reddit", "pinterest", "facebook", "email", "whatsapp", and "telegram" | | `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. Available values are: "bluesky", "email", "facebook", "line", "linkedin", "mastodon", "pinterest", "reddit", "telegram", "twitter", and "whatsapp" |
| `article.showZenMode` | `false` | Flag to activate Zen Mode reading feature for articles. | | `article.showZenMode` | `false` | Flag to activate Zen Mode reading feature for articles. |
### List ### List
@@ -40,7 +40,7 @@ npx blowfish-tools
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
| 名前 | デフォルト | 説明 | | 名前 | デフォルト | 説明 |
|---|---|---| | ------------------------ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `theme` | `"blowfish"` | Hugo Modules を使用している場合は、この設定値を削除する必要があります。 他のすべてのインストールタイプでは、テーマが機能するためにこれを `blowfish` に設定する必要があります。 | | `theme` | `"blowfish"` | Hugo Modules を使用している場合は、この設定値を削除する必要があります。 他のすべてのインストールタイプでは、テーマが機能するためにこれを `blowfish` に設定する必要があります。 |
| `baseURL` | _未設定_ | ウェブサイトのルートへの URL です。 | | `baseURL` | _未設定_ | ウェブサイトのルートへの URL です。 |
| `defaultContentLanguage` | `"en"` | この値は、テーマコンポーネントとコンテンツのデフォルト言語を決定します。 サポートされている言語コードについては、以下の[言語と i18n](#言語と-i18n) セクションを参照してください。 | | `defaultContentLanguage` | `"en"` | この値は、テーマコンポーネントとコンテンツのデフォルト言語を決定します。 サポートされている言語コードについては、以下の[言語と i18n](#言語と-i18n) セクションを参照してください。 |
@@ -66,7 +66,7 @@ Blowfish は多言語ウェブサイト向けに最適化されており、テ
このテーマは現在、デフォルトで次の言語をサポートしています: このテーマは現在、デフォルトで次の言語をサポートしています:
| 言語 | コード | | 言語 | コード |
|---|---| | -------------------------- | ------- |
| アラビア語 | `ar` | | アラビア語 | `ar` |
| ブルガリア語 | `bg` | | ブルガリア語 | `bg` |
| ベンガル語 | `bn` | | ベンガル語 | `bn` |
@@ -90,6 +90,7 @@ Blowfish は多言語ウェブサイト向けに最適化されており、テ
| ポルトガル語(ブラジル) | `pt-br` | | ポルトガル語(ブラジル) | `pt-br` |
| ポルトガル語(ポルトガル) | `pt-pt` | | ポルトガル語(ポルトガル) | `pt-pt` |
| ルーマニア語 | `ro` | | ルーマニア語 | `ro` |
| タイ人 | `th` |
| ロシア語 | `ru` | | ロシア語 | `ru` |
| トルコ語 | `tr` | | トルコ語 | `tr` |
| ベトナム語 | `vi` | | ベトナム語 | `vi` |
@@ -112,7 +113,7 @@ Blowfish は多言語ウェブサイト向けに最適化されており、テ
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
| 名前 | デフォルト | 説明 | | 名前 | デフォルト | 説明 |
|---|---|---| | -------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `languageCode` | `"en"` | このファイルの Hugo 言語コードです。トップレベル言語(例: `en`)またはサブバリアント(例: `en-au`)にすることができ、ファイル名の言語コードと一致する必要があります。Hugo はこの値が常に小文字であることを想定しています。適切な HTML 準拠のために、大文字と小文字を区別する `isoCode` パラメータを設定します。 | | `languageCode` | `"en"` | このファイルの Hugo 言語コードです。トップレベル言語(例: `en`)またはサブバリアント(例: `en-au`)にすることができ、ファイル名の言語コードと一致する必要があります。Hugo はこの値が常に小文字であることを想定しています。適切な HTML 準拠のために、大文字と小文字を区別する `isoCode` パラメータを設定します。 |
| `languageName` | `"English"` | 言語の名前です。 | | `languageName` | `"English"` | 言語の名前です。 |
| `weight` | `1` | 重みは、多言語サイトを構築するときの言語の順序を決定します。 | | `weight` | `1` | 重みは、多言語サイトを構築するときの言語の順序を決定します。 |
@@ -123,7 +124,7 @@ Blowfish は多言語ウェブサイト向けに最適化されており、テ
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
| 名前 | デフォルト | 説明 | | 名前 | デフォルト | 説明 |
|---|---|---| | ---------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `params.displayName` | `"EN"` | ウェブサイトに言語が表示されるときに使用される名前です。 | | `params.displayName` | `"EN"` | ウェブサイトに言語が表示されるときに使用される名前です。 |
| `params.isoCode` | `"en"` | HTML メタデータ用の ISO 言語コードです。トップレベル言語(例: `en`)またはサブバリアント(例: `en-AU`)にすることができます。 | | `params.isoCode` | `"en"` | HTML メタデータ用の ISO 言語コードです。トップレベル言語(例: `en`)またはサブバリアント(例: `en-AU`)にすることができます。 |
| `params.rtl` | `false` | これが RTL 言語かどうかです。`true` に設定すると、コンテンツが右から左に並べ替えられます。 Blowfish は RTL 言語と LTR 言語の同時使用を完全にサポートしており、両方に動的に調整されます。 | | `params.rtl` | `false` | これが RTL 言語かどうかです。`true` に設定すると、コンテンツが右から左に並べ替えられます。 Blowfish は RTL 言語と LTR 言語の同時使用を完全にサポートしており、両方に動的に調整されます。 |
@@ -138,8 +139,8 @@ Blowfish は多言語ウェブサイト向けに最適化されており、テ
#### 著者(Author) #### 著者(Author)
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
| 名前 | デフォルト    | 説明 | | 名前 | デフォルト | 説明 |
|---|---|---| | ----------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `author.name` | _未設定_ | 著者の名前です。これは、記事のフッターと、プロフィールレイアウトが使用されている場合はホームページに表示されます。 | | `author.name` | _未設定_ | 著者の名前です。これは、記事のフッターと、プロフィールレイアウトが使用されている場合はホームページに表示されます。 |
| `author.image` | _未設定_ | 著者の画像ファイルへのパスです。画像は縦横比 1:1 である必要があります。画像は、サイトの `assets/` フォルダに配置することも、外部 URL にすることもできます。 | | `author.image` | _未設定_ | 著者の画像ファイルへのパスです。画像は縦横比 1:1 である必要があります。画像は、サイトの `assets/` フォルダに配置することも、外部 URL にすることもできます。 |
| `author.headline` | _未設定_ | 著者の見出しを含む Markdown 文字列です。プロフィールホームページの著者の名前に下に表示されます。 | | `author.headline` | _未設定_ | 著者の見出しを含む Markdown 文字列です。プロフィールホームページの著者の名前に下に表示されます。 |
@@ -166,7 +167,7 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
### グローバル ### グローバル
| 名前 | デフォルト | 説明 | | 名前 | デフォルト | 説明 |
|---|---|---| | ------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `colorScheme` | `"blowfish"` | 使用するテーマのカラースキームです。有効な値は、`blowfish`(デフォルト)、`avocado`、`fire`、`ocean`、`forest`、`princess`、`neon`、`bloody`、`terminal`、`marvel`、`noir`、`autumn`、`congo`、`slate` です。詳細については、[カラースキーム]({{< ref "getting-started#カラースキーム" >}})セクションを参照してください。 | | `colorScheme` | `"blowfish"` | 使用するテーマのカラースキームです。有効な値は、`blowfish`(デフォルト)、`avocado`、`fire`、`ocean`、`forest`、`princess`、`neon`、`bloody`、`terminal`、`marvel`、`noir`、`autumn`、`congo`、`slate` です。詳細については、[カラースキーム]({{< ref "getting-started#カラースキーム" >}})セクションを参照してください。 |
| `defaultAppearance` | `"light"` | デフォルトのテーマの外観です。`light` または `dark` のいずれかです。 | | `defaultAppearance` | `"light"` | デフォルトのテーマの外観です。`light` または `dark` のいずれかです。 |
| `autoSwitchAppearance` | `true` | 訪問者のオペレーティングシステムの設定に基づいてテーマの外観を自動的に切り替えるかどうかです。`false` に設定すると、サイトは常に `defaultAppearance` を使用します。 | | `autoSwitchAppearance` | `true` | 訪問者のオペレーティングシステムの設定に基づいてテーマの外観を自動的に切り替えるかどうかです。`false` に設定すると、サイトは常に `defaultAppearance` を使用します。 |
@@ -186,17 +187,18 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
| `highlightCurrentMenuArea` | _未設定_ | メインメニューのメニュー項目が選択されているときにマークを付けます。 | | `highlightCurrentMenuArea` | _未設定_ | メインメニューのメニュー項目が選択されているときにマークを付けます。 |
| `smartTOC` | _未設定_ | スマート目次をアクティブにします。表示されている項目が強調表示されます。 | | `smartTOC` | _未設定_ | スマート目次をアクティブにします。表示されている項目が強調表示されます。 |
| `smartTOCHideUnfocusedChildren` | _未設定_ | スマート目次がオンになっている場合、フォーカスされていないときに、テーブルのより深いレベルが非表示になります。 | | `smartTOCHideUnfocusedChildren` | _未設定_ | スマート目次がオンになっている場合、フォーカスされていないときに、テーブルのより深いレベルが非表示になります。 |
| `fingerprintAlgorithm` | `"sha512"` | This configures the fingerprint or resources.Fingerprint used in .Data.Integrity for files provided by the theme. Valid values are `sha512` (default), `sha384`, `sha256` |
### ヘッダー(Header) ### ヘッダー(Header)
| 名前 | デフォルト | 説明 | | 名前 | デフォルト | 説明 |
|---|---|---| | --------------- | ---------- | ------------------------------------------------------------------------------------------------------------------ |
| `header.layout` | `"basic"` | サイト全体のヘッダーを定義します。サポートされている値は、`basic`、`fixed`、`fixed-fill`、`fixed-fill-blur` です。 | | `header.layout` | `"basic"` | サイト全体のヘッダーを定義します。サポートされている値は、`basic`、`fixed`、`fixed-fill`、`fixed-fill-blur` です。 |
### フッター(Footer) ### フッター(Footer)
| 名前 | デフォルト    | 説明 | | 名前 | デフォルト | 説明 |
|---|---|---| | ------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `footer.showMenu` | `true` | フッターメニューを表示/非表示にします。これは、`config/_default/menus.en.toml` ファイルの `[[footer]]` セクションで設定できます。 | | `footer.showMenu` | `true` | フッターメニューを表示/非表示にします。これは、`config/_default/menus.en.toml` ファイルの `[[footer]]` セクションで設定できます。 |
| `footer.showCopyright` | `true` | サイトのフッターに著作権文字列を表示するかどうかです。文字列自体は、[言語設定](#言語と-i18n) の `copyright` パラメータを使用してカスタマイズできることに注意してください。 | | `footer.showCopyright` | `true` | サイトのフッターに著作権文字列を表示するかどうかです。文字列自体は、[言語設定](#言語と-i18n) の `copyright` パラメータを使用してカスタマイズできることに注意してください。 |
| `footer.showThemeAttribution` | `true` | サイトのフッターに「powered by」というテーマの帰属を表示するかどうかです。このメッセージを無効にする場合は、サイトの他の場所(たとえば、about ページ)でテーマの帰属を検討してください。 | | `footer.showThemeAttribution` | `true` | サイトのフッターに「powered by」というテーマの帰属を表示するかどうかです。このメッセージを無効にする場合は、サイトの他の場所(たとえば、about ページ)でテーマの帰属を検討してください。 |
@@ -206,7 +208,7 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
### ホームページ(Homepage) ### ホームページ(Homepage)
| 名前 | デフォルト | 説明 | | 名前 | デフォルト | 説明 |
|---|---|---| | --------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `homepage.layout` | `"profile"` | ホームページのレイアウトです。有効な値は、`page`、`profile`、`hero`、`card`、`background`、`custom` です。`custom` に設定した場合、`/layouts/partials/home/custom.html` ファイルを作成して独自のレイアウトを提供する必要があります。詳細については、[ホームページレイアウト]({{< ref "homepage-layout" >}}) セクションを参照してください。 | | `homepage.layout` | `"profile"` | ホームページのレイアウトです。有効な値は、`page`、`profile`、`hero`、`card`、`background`、`custom` です。`custom` に設定した場合、`/layouts/partials/home/custom.html` ファイルを作成して独自のレイアウトを提供する必要があります。詳細については、[ホームページレイアウト]({{< ref "homepage-layout" >}}) セクションを参照してください。 |
| `homepage.homepageImage` | _未設定_ | `hero` レイアウトと `card` レイアウトで使用される画像です。アセットディレクトリからのローカル画像または外部画像 URL として設定できます。詳細については、[ホームページレイアウト]({{< ref "homepage-layout" >}}) セクションを参照してください。 | | `homepage.homepageImage` | _未設定_ | `hero` レイアウトと `card` レイアウトで使用される画像です。アセットディレクトリからのローカル画像または外部画像 URL として設定できます。詳細については、[ホームページレイアウト]({{< ref "homepage-layout" >}}) セクションを参照してください。 |
| `homepage.showRecent` | `false` | ホームページに最近の記事リストを表示するかどうかです。 | | `homepage.showRecent` | `false` | ホームページに最近の記事リストを表示するかどうかです。 |
@@ -220,8 +222,8 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
### 記事(Article) ### 記事(Article)
| 名前 | デフォルト     | 説明 | | 名前 | デフォルト | 説明 |
|---|---|---| | ------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `article.showDate` | `true` | 記事の日付を表示するかどうかです。 | | `article.showDate` | `true` | 記事の日付を表示するかどうかです。 |
| `article.showViews` | `false` | 記事の表示回数を表示するかどうかです。これには Firebase 統合を有効にする必要があります。以下をご覧ください。 | | `article.showViews` | `false` | 記事の表示回数を表示するかどうかです。これには Firebase 統合を有効にする必要があります。以下をご覧ください。 |
| `article.showLikes` | `false` | 記事のいいねを表示するかどうかです。これには Firebase 統合を有効にする必要があります。以下をご覧ください。 | | `article.showLikes` | `false` | 記事のいいねを表示するかどうかです。これには Firebase 統合を有効にする必要があります。以下をご覧ください。 |
@@ -250,13 +252,13 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
| `article.showAuthorsBadges` | `false` | `authors` タクソノミーを記事またはリストのヘッダーに表示するかどうかです。これには、「複数の著者」と `authors` タクソノミーの設定が必要です。この機能の設定方法の詳細については、[このページ]({{< ref "multi-author" >}}) を確認してください。 | | `article.showAuthorsBadges` | `false` | `authors` タクソノミーを記事またはリストのヘッダーに表示するかどうかです。これには、「複数の著者」と `authors` タクソノミーの設定が必要です。この機能の設定方法の詳細については、[このページ]({{< ref "multi-author" >}}) を確認してください。 |
| `article.showWordCount` | `false` | 記事の単語数を表示するかどうかです。 | | `article.showWordCount` | `false` | 記事の単語数を表示するかどうかです。 |
| `article.showComments` | `false` | 記事のフッターの後に [コメントパーシャル]({{< ref "partials#コメント" >}}) を含めるかどうかです。 | | `article.showComments` | `false` | 記事のフッターの後に [コメントパーシャル]({{< ref "partials#コメント" >}}) を含めるかどうかです。 |
| `article.sharingLinks` | _未設定_ | 各記事の最後に表示する共有リンクです。指定されていないか、`false` に設定されている場合、リンクは表示されません。使用可能な値は、<br>"linkedin"、"bluesky"、<br>"mastodon"、"twitter"、"reddit"、<br>"pinterest"、"facebook"、"email"、<br>"whatsapp"、"telegram" です。 | | `article.sharingLinks` | _未設定_ | 各記事の最後に表示する共有リンクです。指定されていないか、`false` に設定されている場合、リンクは表示されません。使用可能な値は、"bluesky"、"email"、"facebook"、"line"、"linkedin"、"mastodon"、"pinterest"、"reddit"、"telegram"、"twitter"、"whatsapp"です。 |
| `article.showZenMode` | `false` | 記事のZenモードリーダー機能を有効にするフラグです。 | | `article.showZenMode` | `false` | 記事のZenモードリーダー機能を有効にするフラグです。 |
### リスト(List) ### リスト(List)
| 名前 | デフォルト    | 説明 | | 名前 | デフォルト | 説明 |
| ---------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ---------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `list.showHero` | `false` | 各リストページ内でサムネイル画像をヒーロー画像として表示するかどうか。 | | `list.showHero` | `false` | 各リストページ内でサムネイル画像をヒーロー画像として表示するかどうか。 |
| `list.heroStyle` | _未設定_ | ヒーロー画像の表示スタイル。有効なオプションは `basic`、`big`、`background`、`thumbAndBackground` です。 | | `list.heroStyle` | _未設定_ | ヒーロー画像の表示スタイル。有効なオプションは `basic`、`big`、`background`、`thumbAndBackground` です。 |
| `list.showBreadcrumbs` | `false` | リストページのヘッダーにパンくずリストを表示するかどうか。 | | `list.showBreadcrumbs` | `false` | リストページのヘッダーにパンくずリストを表示するかどうか。 |
@@ -277,13 +279,13 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
### サイトマップ(Sitemap) ### サイトマップ(Sitemap)
| 名前 | デフォルト | 説明 | | 名前 | デフォルト | 説明 |
| ----------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sitemap.excludedKinds` | `["taxonomy", "term"]` | 生成された `/sitemap.xml` ファイルから除外するコンテンツの種類。許容される値については、[Hugo のドキュメント](https://gohugo.io/templates/section-templates/#page-kinds)を参照してください。 | | `sitemap.excludedKinds` | `["taxonomy", "term"]` | 生成された `/sitemap.xml` ファイルから除外するコンテンツの種類。許容される値については、[Hugo のドキュメント](https://gohugo.io/templates/section-templates/#page-kinds)を参照してください。 |
### タクソノミー(Taxonomy) ### タクソノミー(Taxonomy)
| 名前 | デフォルト   | 説明 | | 名前 | デフォルト | 説明 |
| ------------------------------ | --------- | ----------------------------------------------------------------------------------------------------------------- | | ------------------------------ | ---------- | ----------------------------------------------------------------------------------------------------------------------- |
| `taxonomy.showTermCount` | `true` | タクソノミーリストにタクソノミー用語内の記事数を表示するかどうか。 | | `taxonomy.showTermCount` | `true` | タクソノミーリストにタクソノミー用語内の記事数を表示するかどうか。 |
| `taxonomy.showHero` | `false` | 各タクソノミーページ内でサムネイル画像をヒーロー画像として表示するかどうか。 | | `taxonomy.showHero` | `false` | 各タクソノミーページ内でサムネイル画像をヒーロー画像として表示するかどうか。 |
| `taxonomy.heroStyle` | _未設定_ | ヒーロー画像の表示スタイル。有効なオプションは `basic`、`big`、`background`、`thumbAndBackground` です。 | | `taxonomy.heroStyle` | _未設定_ | ヒーロー画像の表示スタイル。有効なオプションは `basic`、`big`、`background`、`thumbAndBackground` です。 |
@@ -295,8 +297,8 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
### ターム(Term) ### ターム(Term)
| 名前 | デフォルト   | 説明 | | 名前 | デフォルト | 説明 |
| -------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------- | | -------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------- |
| `term.showHero` | `false` | 各タームページ内でサムネイル画像をヒーロー画像として表示するかどうか。 | | `term.showHero` | `false` | 各タームページ内でサムネイル画像をヒーロー画像として表示するかどうか。 |
| `term.heroStyle` | _未設定_ | ヒーロー画像の表示スタイル。有効なオプションは `basic`、`big`、`background`、`thumbAndBackground` です。 | | `term.heroStyle` | _未設定_ | ヒーロー画像の表示スタイル。有効なオプションは `basic`、`big`、`background`、`thumbAndBackground` です。 |
| `term.showBreadcrumbs` | `false` | タームのヘッダーにパンくずリストを表示するかどうか。 | | `term.showBreadcrumbs` | `false` | タームのヘッダーにパンくずリストを表示するかどうか。 |
@@ -309,8 +311,8 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
### Firebase ### Firebase
| 名前 | デフォルト    | 説明 | | 名前 | デフォルト | 説明 |
| ---------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ---------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `firebase.apiKey` | _未設定_ | Firebase との統合に必要な Firebase API キー。Firebase を Blowfish に統合する方法については、[このページ]({{< ref "firebase-views" >}})を参照してください。 | | `firebase.apiKey` | _未設定_ | Firebase との統合に必要な Firebase API キー。Firebase を Blowfish に統合する方法については、[このページ]({{< ref "firebase-views" >}})を参照してください。 |
| `firebase.authDomain` | _未設定_ | Firebase との統合に必要な Firebase 認証ドメイン。Firebase を Blowfish に統合する方法については、[このページ]({{< ref "firebase-views" >}})を参照してください。 | | `firebase.authDomain` | _未設定_ | Firebase との統合に必要な Firebase 認証ドメイン。Firebase を Blowfish に統合する方法については、[このページ]({{< ref "firebase-views" >}})を参照してください。 |
| `firebase.projectId` | _未設定_ | Firebase との統合に必要な Firebase プロジェクト ID。Firebase を Blowfish に統合する方法については、[このページ]({{< ref "firebase-views" >}})を参照してください。 | | `firebase.projectId` | _未設定_ | Firebase との統合に必要な Firebase プロジェクト ID。Firebase を Blowfish に統合する方法については、[このページ]({{< ref "firebase-views" >}})を参照してください。 |
@@ -321,15 +323,15 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
### Fathom Analytics ### Fathom Analytics
| 名前 | デフォルト    | 説明 | | 名前 | デフォルト | 説明 |
| ------------------------ | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | ------------------------ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fathomAnalytics.site` | _未設定_ | ウェブサイト用に Fathom Analytics によって生成されたサイトコード。詳細については、[Analytics のドキュメント]({{< ref "partials#アナリティクス" >}})を参照してください。 | | `fathomAnalytics.site` | _未設定_ | ウェブサイト用に Fathom Analytics によって生成されたサイトコード。詳細については、[Analytics のドキュメント]({{< ref "partials#アナリティクス" >}})を参照してください。 |
| `fathomAnalytics.domain` | _未設定_ | Fathom Analytics でカスタムドメインを使用している場合、ここに指定して、`script.js` をカスタムドメインから配信します。 | | `fathomAnalytics.domain` | _未設定_ | Fathom Analytics でカスタムドメインを使用している場合、ここに指定して、`script.js` をカスタムドメインから配信します。 |
### Umami Analytics ### Umami Analytics
| 名前 | デフォルト    | 説明 | | 名前 | デフォルト | 説明 |
|---|---|---| | --------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `umamiAnalytics.websiteid` | _未設定_ | ウェブサイト用に Umami Analytics によって生成されたサイトコード。詳細については、[Analytics のドキュメント]({{< ref "partials#アナリティクス" >}})を参照してください。 | | `umamiAnalytics.websiteid` | _未設定_ | ウェブサイト用に Umami Analytics によって生成されたサイトコード。詳細については、[Analytics のドキュメント]({{< ref "partials#アナリティクス" >}})を参照してください。 |
| `umamiAnalytics.domain` | _未設定_ | Umami Analytics でカスタムドメインを使用している場合、ここに指定して、`script.js` をカスタムドメインから配信します。 | | `umamiAnalytics.domain` | _未設定_ | Umami Analytics でカスタムドメインを使用している場合、ここに指定して、`script.js` をカスタムドメインから配信します。 |
| `umamiAnalytics.dataDomains` | _未設定_ | トラッカーを特定のドメインでのみ実行したい場合は、トラッカースクリプトに指定します。これは、ドメイン名のカンマ区切りリストです。例えば "yoursite.com,yoursite2.com" のようになります。 | | `umamiAnalytics.dataDomains` | _未設定_ | トラッカーを特定のドメインでのみ実行したい場合は、トラッカースクリプトに指定します。これは、ドメイン名のカンマ区切りリストです。例えば "yoursite.com,yoursite2.com" のようになります。 |
@@ -338,15 +340,15 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
### Seline Analytics ### Seline Analytics
| 名前 | デフォルト    | 説明 | | 名前 | デフォルト | 説明 |
|-----------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------| | ---------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `selineAnalytics.token` | _未設定_ | ウェブサイト用に Seline Analytics によって生成されたトークン。詳細については、[Analytics のドキュメント]({{< ref "partials#アナリティクス" >}})を参照してください。 | | `selineAnalytics.token` | _未設定_ | ウェブサイト用に Seline Analytics によって生成されたトークン。詳細については、[Analytics のドキュメント]({{< ref "partials#アナリティクス" >}})を参照してください。 |
| `selineAnalytics.enableTrackEvent` | `true` | `true` に設定すると、トラックイベントが自動的に追加されます。トラックイベントを追加したくない場合は、`false` に設定してください。 | | `selineAnalytics.enableTrackEvent` | `true` | `true` に設定すると、トラックイベントが自動的に追加されます。トラックイベントを追加したくない場合は、`false` に設定してください。 |
### BuyMeACoffee ### BuyMeACoffee
| 名前 | デフォルト   | 説明 | | 名前 | デフォルト | 説明 |
| ----------------------------------- | --------- | -------------------------------------------------------------------------------------- | | ----------------------------------- | ---------- | ---------------------------------------------------------------------- |
| `buymeacoffee.identifier` | _未設定_ | ターゲットの buymeacoffee アカウントの識別子。 | | `buymeacoffee.identifier` | _未設定_ | ターゲットの buymeacoffee アカウントの識別子。 |
| `buymeacoffee.globalWidget` | _未設定_ | グローバル buymeacoffee ウィジェットを有効にします。 | | `buymeacoffee.globalWidget` | _未設定_ | グローバル buymeacoffee ウィジェットを有効にします。 |
| `buymeacoffee.globalWidgetMessage` | _未設定_ | 新しいユーザーが初めてサイトにアクセスしたときに表示されるメッセージ。 | | `buymeacoffee.globalWidgetMessage` | _未設定_ | 新しいユーザーが初めてサイトにアクセスしたときに表示されるメッセージ。 |
@@ -355,8 +357,8 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
### verification ### verification
| 名前 | デフォルト  | 説明 | | 名前 | デフォルト | 説明 |
| ------------------------ | --------- | ------------------------------------------------------------------------------------------------------- | | ------------------------ | ---------- | ------------------------------------------------------------------ |
| `verification.google` | _未設定_ | サイトメタデータに含まれる、Google が提供するサイト確認文字列。 | | `verification.google` | _未設定_ | サイトメタデータに含まれる、Google が提供するサイト確認文字列。 |
| `verification.bing` | _未設定_ | サイトメタデータに含まれる、Bing が提供するサイト確認文字列。 | | `verification.bing` | _未設定_ | サイトメタデータに含まれる、Bing が提供するサイト確認文字列。 |
| `verification.pinterest` | _未設定_ | サイトメタデータに含まれる、Pinterest が提供するサイト確認文字列。 | | `verification.pinterest` | _未設定_ | サイトメタデータに含まれる、Pinterest が提供するサイト確認文字列。 |
@@ -365,8 +367,8 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
## RSSNext ## RSSNext
| 名前 | デフォルト    | 説明 | | 名前 | デフォルト | 説明 |
| ------------------------ | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ---------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rssnext.feedId` | _未設定_ | [RSSNext/Follow](https://follow.is/) によって提供される rss `feedId` 文字列。`rss.xml` に含まれ、rss フィードを自身のものとしてクレームするのに役立ちます。 | | `rssnext.feedId` | _未設定_ | [RSSNext/Follow](https://follow.is/) によって提供される rss `feedId` 文字列。`rss.xml` に含まれ、rss フィードを自身のものとしてクレームするのに役立ちます。 |
| `rssnext.userId` | _未設定_ | [RSSNext/Follow](https://follow.is/) によって提供される rss `userId` 文字列。`rss.xml` に含まれ、rss フィードを自身のものとしてクレームするのに役立ちます。 | | `rssnext.userId` | _未設定_ | [RSSNext/Follow](https://follow.is/) によって提供される rss `userId` 文字列。`rss.xml` に含まれ、rss フィードを自身のものとしてクレームするのに役立ちます。 |
@@ -92,6 +92,7 @@ The theme currently supports the following languages by default:
| Portuguese (Portugal) | `pt-pt` | | Portuguese (Portugal) | `pt-pt` |
| Romanian | `ro` | | Romanian | `ro` |
| Russian | `ru` | | Russian | `ru` |
| Thai | `th` |
| Turkish | `tr` | | Turkish | `tr` |
| Vietnamese | `vi` | | Vietnamese | `vi` |
| Simplified Chinese (China) | `zh-cn` | | Simplified Chinese (China) | `zh-cn` |
@@ -192,6 +193,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected | | `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected |
| `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | | `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. |
| `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | | `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. |
| `fingerprintAlgorithm` | `"sha512"` | This configures the fingerprint or resources.Fingerprint used in .Data.Integrity for files provided by the theme. Valid values are `sha512` (default), `sha384`, `sha256` |
### Header ### Header
@@ -252,11 +254,12 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `article.showTableOfContents` | `false` | Whether or not the table of contents is displayed on articles. | | `article.showTableOfContents` | `false` | Whether or not the table of contents is displayed on articles. |
| `article.showRelatedContent` | `false` | Display related content for each post. Might required additional configuration to your `config.toml`. Please check the theme `config.toml` if you want to enable this feature and copy all the relevant _related_ entries. Also check [Hugo's docs](https://gohugo.io/content-management/related/) on related content. | | `article.showRelatedContent` | `false` | Display related content for each post. Might required additional configuration to your `config.toml`. Please check the theme `config.toml` if you want to enable this feature and copy all the relevant _related_ entries. Also check [Hugo's docs](https://gohugo.io/content-management/related/) on related content. |
| `article.relatedContentLimit` | `3` | Limit of related articles to display if `showRelatedContent` is turned on. | | `article.relatedContentLimit` | `3` | Limit of related articles to display if `showRelatedContent` is turned on. |
| `article.showTaxonomies` | `false` | Whether or not the taxonomies related to this article are displayed. | | `article.showTaxonomies` | `false` | Whether or not all the taxonomies related to this article are displayed. |
| `article.showCategoryOnly` | `false` | Whether or not the "category" taxonomy is displayed. `showTaxonomies` should be `false` when this param is used, otherwise duplicates will appear. |
| `article.showAuthorsBadges` | `false` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. | | `article.showAuthorsBadges` | `false` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. |
| `article.showWordCount` | `false` | Whether or not article word counts are displayed. | | `article.showWordCount` | `false` | Whether or not article word counts are displayed. |
| `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. | | `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. |
| `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. Available values are: "linkedin", "bluesky", "mastodon", "twitter", "reddit", "pinterest", "facebook", "email", "whatsapp", and "telegram" | | `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. Available values are: "bluesky", "email", "facebook", "line", "linkedin", "mastodon", "pinterest", "reddit", "telegram", "twitter", and "whatsapp" |
| `article.showZenMode` | `false` | Flag to activate Zen Mode reading feature for articles. | | `article.showZenMode` | `false` | Flag to activate Zen Mode reading feature for articles. |
### List ### List
@@ -90,6 +90,7 @@ Blowfish 主题目前默认支持了以下语言:
| Portuguese (Portugal) | `pt-pt` | | Portuguese (Portugal) | `pt-pt` |
| Romanian | `ro` | | Romanian | `ro` |
| Russian | `ru` | | Russian | `ru` |
| Thai | `th` |
| Turkish | `tr` | | Turkish | `tr` |
| Vietnamese | `vi` | | Vietnamese | `vi` |
| Simplified Chinese (China) | `zh-cn` | | Simplified Chinese (China) | `zh-cn` |
@@ -190,6 +191,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
| `highlightCurrentMenuArea` | 无 | 当菜单被选择时,标记主菜单中的菜单项。 | | `highlightCurrentMenuArea` | 无 | 当菜单被选择时,标记主菜单中的菜单项。 |
| `smartTOC` | 无 | 开启智能目录,视图中的项目将会被高亮显示。 | | `smartTOC` | 无 | 开启智能目录,视图中的项目将会被高亮显示。 |
| `smartTOCHideUnfocusedChildren` | 无 | 当开启智能目录,如果目录级别不再被聚焦时,将会隐藏更深层次的目录。 | | `smartTOCHideUnfocusedChildren` | 无 | 当开启智能目录,如果目录级别不再被聚焦时,将会隐藏更深层次的目录。 |
| `fingerprintAlgorithm` | `"sha512"` | This configures the fingerprint or resources.Fingerprint used in .Data.Integrity for files provided by the theme. Valid values are `sha512` (default), `sha384`, `sha256` |
### 页头 ### 页头
@@ -254,7 +256,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
| `article.showAuthorsBadges` | `false` | 是否在文章或列表中显示 `authors` 分类。这需要开启多个作者 `multiple authors` 和 `authors` 分类法。 请阅读 [这个网页]({{< ref "multi-author" >}}) 来获取更多内容。 | | `article.showAuthorsBadges` | `false` | 是否在文章或列表中显示 `authors` 分类。这需要开启多个作者 `multiple authors` 和 `authors` 分类法。 请阅读 [这个网页]({{< ref "multi-author" >}}) 来获取更多内容。 |
| `article.showWordCount` | `false` | 是否显示文章的字数。 如果你的语言属于 CJK 语言,需要在 `config.toml` 中开启 `hasCJKLanguage` 参数。 | | `article.showWordCount` | `false` | 是否显示文章的字数。 如果你的语言属于 CJK 语言,需要在 `config.toml` 中开启 `hasCJKLanguage` 参数。 |
| `article.showComments` | `false` | 是否在文章末尾添加 [评论部分]({{< ref "partials#comments" >}})。 | | `article.showComments` | `false` | 是否在文章末尾添加 [评论部分]({{< ref "partials#comments" >}})。 |
| `article.sharingLinks` | 无 | 在文章末尾显示的分享链接。如果没有提供或设置为 `false`,则不会显示任何分享链接。可用的值包括:"linkedin"、"bluesky"、"mastodon"、"twitter"、"reddit"、"pinterest"、"facebook"、"email"、"whatsapp" 和 "telegram" | | `article.sharingLinks` | _无_ | 在文章末尾显示的分享链接。如果没有提供或设置为 `false`,则不会显示任何分享链接。可用的值包括:"bluesky"、"email"、"facebook"、"line"、"linkedin"、"mastodon"、"pinterest"、"reddit"、"telegram"、"twitter"和"whatsapp" |
| `article.showZenMode` | `false` | 指定是否激活文章阅读的禅模式,即隐藏常规的界面元素。 | | `article.showZenMode` | `false` | 指定是否激活文章阅读的禅模式,即隐藏常规的界面元素。 |
### 列表页 ### 列表页
@@ -198,7 +198,7 @@ date: 2022-01-25
externalUrl: "https://medium.com/" externalUrl: "https://medium.com/"
summary: "I wrote a post on Medium." summary: "I wrote a post on Medium."
showReadingTime: false showReadingTime: false
_build: build:
render: "false" render: "false"
list: "local" list: "local"
--- ---
@@ -206,7 +206,7 @@ _build:
Along with the normal front matter parameters like `title` and `summary`, the `externalUrl` parameter is used to tell Blowfish that this is not an ordinary article. The URL provided here will be where visitors are directed when they select this article. Along with the normal front matter parameters like `title` and `summary`, the `externalUrl` parameter is used to tell Blowfish that this is not an ordinary article. The URL provided here will be where visitors are directed when they select this article.
Additionally, we use a special Hugo front matter parameter `_build` to prevent a normal page for this content being generated - there's no point generating a page since we're linking to an external URL! Additionally, we use a special Hugo front matter parameter `build` to prevent a normal page for this content being generated - there's no point generating a page since we're linking to an external URL!
The theme includes an archetype to make generating these external link articles simple. Just specify `-k external` when making new content. The theme includes an archetype to make generating these external link articles simple. Just specify `-k external` when making new content.
@@ -198,7 +198,7 @@ date: 2022-01-25
externalUrl: "https://medium.com/" externalUrl: "https://medium.com/"
summary: "Medium に記事を投稿しました。" summary: "Medium に記事を投稿しました。"
showReadingTime: false showReadingTime: false
_build: build:
render: "false" render: "false"
list: "local" list: "local"
--- ---
@@ -206,7 +206,7 @@ _build:
`title` や `summary` などの通常の Front Matter パラメータに加えて、`externalUrl` パラメータは、これが通常の記事ではないことを Blowfish に伝えるために使用されます。ここに指定された URL は、訪問者がこの記事を選択した際にリダイレクトされる場所です。 `title` や `summary` などの通常の Front Matter パラメータに加えて、`externalUrl` パラメータは、これが通常の記事ではないことを Blowfish に伝えるために使用されます。ここに指定された URL は、訪問者がこの記事を選択した際にリダイレクトされる場所です。
さらに、特別な Hugo フロントマターパラメータ `_build` を使用して、このコンテンツの通常のページが生成されないようにします。外部リンクにリダイレクトするため、ページを生成する必要はありません。 さらに、特別な Hugo フロントマターパラメータ `build` を使用して、このコンテンツの通常のページが生成されないようにします。外部リンクにリダイレクトするため、ページを生成する必要はありません。
テーマには、外部リンク記事を簡単に作成するためのアーキタイプが含まれています。新しいコンテンツを作成する際に、`-k external` を指定するだけです。 テーマには、外部リンク記事を簡単に作成するためのアーキタイプが含まれています。新しいコンテンツを作成する際に、`-k external` を指定するだけです。
@@ -198,7 +198,7 @@ date: 2022-01-25
externalUrl: "https://medium.com/" externalUrl: "https://medium.com/"
summary: "I wrote a post on Medium." summary: "I wrote a post on Medium."
showReadingTime: false showReadingTime: false
_build: build:
render: "false" render: "false"
list: "local" list: "local"
--- ---
@@ -206,7 +206,7 @@ _build:
Along with the normal front matter parameters like `title` and `summary`, the `externalUrl` parameter is used to tell Blowfish that this is not an ordinary article. The URL provided here will be where visitors are directed when they select this article. Along with the normal front matter parameters like `title` and `summary`, the `externalUrl` parameter is used to tell Blowfish that this is not an ordinary article. The URL provided here will be where visitors are directed when they select this article.
Additionally, we use a special Hugo front matter parameter `_build` to prevent a normal page for this content being generated - there's no point generating a page since we're linking to an external URL! Additionally, we use a special Hugo front matter parameter `build` to prevent a normal page for this content being generated - there's no point generating a page since we're linking to an external URL!
The theme includes an archetype to make generating these external link articles simple. Just specify `-k external` when making new content. The theme includes an archetype to make generating these external link articles simple. Just specify `-k external` when making new content.
@@ -198,7 +198,7 @@ date: 2022-01-25
externalUrl: "https://medium.com/" externalUrl: "https://medium.com/"
summary: "我在Medium上写了一篇文章。" summary: "我在Medium上写了一篇文章。"
showReadingTime: false showReadingTime: false
_build: build:
render: "false" render: "false"
list: "local" list: "local"
--- ---
@@ -206,7 +206,7 @@ _build:
除了像 `title` 和 `summary` 这种普通的扉页参数外,需要设置 `externalUrl` 参数来告诉 Blowfish 这不是一篇普通的文章。访问者在访问后,会被重定向到这里提供的 URL。 除了像 `title` 和 `summary` 这种普通的扉页参数外,需要设置 `externalUrl` 参数来告诉 Blowfish 这不是一篇普通的文章。访问者在访问后,会被重定向到这里提供的 URL。
此外,我们使用了 `_build` 参数来避免 Hugo 生成一个普通页面。因为我们是一个连接到外部的 URL,生成页面是没有意义的。 此外,我们使用了 `build` 参数来避免 Hugo 生成一个普通页面。因为我们是一个连接到外部的 URL,生成页面是没有意义的。
Hugo 中可以通过命令来快速生成一个外部链接的文件,在创建新的外部链接是,只需要指定 `-k external` 即可。这让生成外部链接文章变得更简单。 Hugo 中可以通过命令来快速生成一个外部链接的文件,在创建新的外部链接是,只需要指定 `-k external` 即可。这让生成外部链接文章变得更简单。
@@ -137,3 +137,11 @@ If you wish to insert additional code after article links, create a `layouts/par
The theme allows for inserting additional code directly into the `<head>` and `<footer>` sections of the template. These can be useful for providing scripts or other logic that isn't part of the theme. The theme allows for inserting additional code directly into the `<head>` and `<footer>` sections of the template. These can be useful for providing scripts or other logic that isn't part of the theme.
Simply create either `layouts/partials/extend-head.html` or `layouts/partials/extend-footer.html` and these will automatically be included in your website build. Both partials are injected as the last items in `<head>` and `<footer>` so they can be used to override theme defaults. Simply create either `layouts/partials/extend-head.html` or `layouts/partials/extend-footer.html` and these will automatically be included in your website build. Both partials are injected as the last items in `<head>` and `<footer>` so they can be used to override theme defaults.
### Uncached Head Extension
The `extend-head.html` is [cached](https://gohugo.io/functions/partials/includecached/), and Blowfish also supports an uncached head extension for **conditionally** including scripts or metadata based on page-level properties. To use this feature, create a `layouts/partials/extend-head-uncached.html` file in your project. This file will be included in `<head>` HTML tag.
This is useful when you need to include dynamic elements—such as scripts or metadata—based on properties like shortcodes, front matter flags, or other page-specific data that should not be cached across builds.
For example, to dynamically load a CDN JavaScript file base on the appearance of a shortcode, you can use the [HasShortcode](https://gohugo.io/methods/page/hasshortcode/#article) method within `extend-head-uncached.html`.
@@ -137,3 +137,11 @@ Blowfish は、基本機能を拡張できる多数の拡張パーシャルも
このテーマでは、テンプレートの `<head>` セクションと `<footer>` セクションに直接コードを追加できます。これらは、テーマの一部ではないスクリプトやその他のロジックを提供するのに役立ちます。 このテーマでは、テンプレートの `<head>` セクションと `<footer>` セクションに直接コードを追加できます。これらは、テーマの一部ではないスクリプトやその他のロジックを提供するのに役立ちます。
`layouts/partials/extend-head.html` または `layouts/partials/extend-footer.html` を作成するだけで、これらは自動的にウェブサイトのビルドに含まれます。どちらのパーシャルも `<head>` と `<footer>` の最後の項目として挿入されるため、テーマのデフォルトを上書きするために使用できます。 `layouts/partials/extend-head.html` または `layouts/partials/extend-footer.html` を作成するだけで、これらは自動的にウェブサイトのビルドに含まれます。どちらのパーシャルも `<head>` と `<footer>` の最後の項目として挿入されるため、テーマのデフォルトを上書きするために使用できます。
### 非キャッシュの head 拡張
`extend-head.html` は[キャッシュされる](https://gohugo.io/functions/partials/includecached/)が、Blowfish ではページ単位の条件に応じてスクリプトやメタデータを動的に含めるための、非キャッシュの head 拡張にも対応している。この機能を使うには、プロジェクト内に `layouts/partials/extend-head-uncached.html` ファイルを作成する。このファイルは HTML の `<head>` タグ内に読み込まれる。
これは、ショートコードや front matter のフラグなど、ビルド間でキャッシュされるべきでないページ固有の要素に基づいて、スクリプトやメタデータを動的に含めたい場合に有用。
たとえば、ショートコードの有無に応じて CDN の JavaScript ファイルを読み込むには、`extend-head-uncached.html` 内で [HasShortcode](https://gohugo.io/methods/page/hasshortcode/#article) メソッドを使う。
@@ -137,3 +137,11 @@ If you wish to insert additional code after article links, create a `layouts/par
The theme allows for inserting additional code directly into the `<head>` and `<footer>` sections of the template. These can be useful for providing scripts or other logic that isn't part of the theme. The theme allows for inserting additional code directly into the `<head>` and `<footer>` sections of the template. These can be useful for providing scripts or other logic that isn't part of the theme.
Simply create either `layouts/partials/extend-head.html` or `layouts/partials/extend-footer.html` and these will automatically be included in your website build. Both partials are injected as the last items in `<head>` and `<footer>` so they can be used to override theme defaults. Simply create either `layouts/partials/extend-head.html` or `layouts/partials/extend-footer.html` and these will automatically be included in your website build. Both partials are injected as the last items in `<head>` and `<footer>` so they can be used to override theme defaults.
### Uncached Head Extension
The `extend-head.html` is [cached](https://gohugo.io/functions/partials/includecached/), and Blowfish also supports an uncached head extension for **conditionally** including scripts or metadata based on page-level properties. To use this feature, create a `layouts/partials/extend-head-uncached.html` file in your project. This file will be included in `<head>` HTML tag.
This is useful when you need to include dynamic elements—such as scripts or metadata—based on properties like shortcodes, front matter flags, or other page-specific data that should not be cached across builds.
For example, to dynamically load a CDN JavaScript file base on the appearance of a shortcode, you can use the [HasShortcode](https://gohugo.io/methods/page/hasshortcode/#article) method within `extend-head-uncached.html`.
@@ -140,3 +140,11 @@ Blowfish 还提供了许多扩展 partial,可以扩展基本功能。
本主题允许在模板的`<head>`和`<footer>`部分直接插入附加代码。这些代码可用于提供不属于主题的脚本或其他逻辑。 本主题允许在模板的`<head>`和`<footer>`部分直接插入附加代码。这些代码可用于提供不属于主题的脚本或其他逻辑。
只需创建`layouts/partials/extend-head.html`或`layouts/partials/extend-footer.html`,这些部分就会自动包含在网站构建中。这两个 partial 将作为最后一项注入到 `<head>` 和 `<footer>` 中,因此它们可用于覆盖主题默认值。 只需创建`layouts/partials/extend-head.html`或`layouts/partials/extend-footer.html`,这些部分就会自动包含在网站构建中。这两个 partial 将作为最后一项注入到 `<head>` 和 `<footer>` 中,因此它们可用于覆盖主题默认值。
### 非缓存的 Head 扩展
`extend-head.html` 是被[缓存](https://gohugo.io/functions/partials/includecached/)的,Blowfish 同时支持一种非缓存的 head 扩展方式,用于根据页面属性**条件性地**插入脚本或元数据。要使用此功能,请在项目中创建 `layouts/partials/extend-head-uncached.html` 文件,该文件会被插入到 `<head>` 标签中。
此功能适用于根据 shortcode、front matter 标记或其他页面专属数据,动态添加脚本或元数据,避免内容在构建时被缓存。
例如,可在 `extend-head-uncached.html` 中使用 [HasShortcode](https://gohugo.io/methods/page/hasshortcode/#article) 方法,根据 shortcode 是否存在动态加载 CDN JavaScript 文件。
@@ -480,17 +480,17 @@ The `katex` shortcode can be used to add mathematical expressions to article con
To include mathematical expressions in an article, simply place the shortcode anywhere with the content. It only needs to be included once per article and KaTeX will automatically render any markup on that page. Both inline and block notation are supported. To include mathematical expressions in an article, simply place the shortcode anywhere with the content. It only needs to be included once per article and KaTeX will automatically render any markup on that page. Both inline and block notation are supported.
Inline notation can be generated by wrapping the expression in `\\(` and `\\)` delimiters. Alternatively, block notation can be generated using `$$` delimiters. Inline notation can be generated by wrapping the expression in `\(` and `\)` delimiters. Alternatively, block notation can be generated using `$$` delimiters.
**Example:** **Example:**
```md ```md
{{</* katex */>}} {{</* katex */>}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\) \(f(a,b,c) = (a^2+b^2+c^2)^3\)
``` ```
{{< katex >}} {{< katex >}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\) \(f(a,b,c) = (a^2+b^2+c^2)^3\)
Check out the [mathematical notation samples]({{< ref "mathematical-notation" >}}) page for more examples. Check out the [mathematical notation samples]({{< ref "mathematical-notation" >}}) page for more examples.
@@ -480,17 +480,17 @@ Blowfish も、標準の Markdown 構文を使用して含まれる画像の自
記事に数式を含めるには、コンテンツを含むショートコードを任意の場所に配置するだけです。記事ごとに1回だけ含める必要があり、KaTeX はそのページのマークアップを自動的にレンダリングします。インライン表記とブロック表記の両方がサポートされています。 記事に数式を含めるには、コンテンツを含むショートコードを任意の場所に配置するだけです。記事ごとに1回だけ含める必要があり、KaTeX はそのページのマークアップを自動的にレンダリングします。インライン表記とブロック表記の両方がサポートされています。
インライン表記は、式を `\\(` と `\\)` デリミタで囲むことで生成できます。また、ブロック表記は `$$` デリミタを使用して生成できます。 インライン表記は、式を `\(` と `\)` デリミタで囲むことで生成できます。また、ブロック表記は `$$` デリミタを使用して生成できます。
**例:** **例:**
```md ```md
{{</* katex */>}} {{</* katex */>}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\) \(f(a,b,c) = (a^2+b^2+c^2)^3\)
``` ```
{{< katex >}} {{< katex >}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\) \(f(a,b,c) = (a^2+b^2+c^2)^3\)
[数式表記のサンプル]({{< ref "mathematical-notation" >}})ページで、その他の例を確認できます。 [数式表記のサンプル]({{< ref "mathematical-notation" >}})ページで、その他の例を確認できます。
+3 -3
View File
@@ -484,17 +484,17 @@ The `katex` shortcode can be used to add mathematical expressions to article con
To include mathematical expressions in an article, simply place the shortcode anywhere with the content. It only needs to be included once per article and KaTeX will automatically render any markup on that page. Both inline and block notation are supported. To include mathematical expressions in an article, simply place the shortcode anywhere with the content. It only needs to be included once per article and KaTeX will automatically render any markup on that page. Both inline and block notation are supported.
Inline notation can be generated by wrapping the expression in `\\(` and `\\)` delimiters. Alternatively, block notation can be generated using `$$` delimiters. Inline notation can be generated by wrapping the expression in `\(` and `\)` delimiters. Alternatively, block notation can be generated using `$$` delimiters.
**Example:** **Example:**
```md ```md
{{</* katex */>}} {{</* katex */>}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\) \(f(a,b,c) = (a^2+b^2+c^2)^3\)
``` ```
{{< katex >}} {{< katex >}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\) \(f(a,b,c) = (a^2+b^2+c^2)^3\)
Check out the [mathematical notation samples]({{< ref "mathematical-notation" >}}) page for more examples. Check out the [mathematical notation samples]({{< ref "mathematical-notation" >}}) page for more examples.
@@ -463,17 +463,17 @@ Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用
要在文章中加入数学表达式,只需将简码放在任意位置即可。每篇文章只需加入一次,KaTeX 将自动呈现该页面上的任何标记。支持内联和块表示法。 要在文章中加入数学表达式,只需将简码放在任意位置即可。每篇文章只需加入一次,KaTeX 将自动呈现该页面上的任何标记。支持内联和块表示法。
可以通过将表达式包装在 `\\(` 和 `\\)` 分隔符中来生成内联表示法。或者,可以使用 `$$` 分隔符生成块符号。 可以通过将表达式包装在 `\(` 和 `\)` 分隔符中来生成内联表示法。或者,可以使用 `$$` 分隔符生成块符号。
**例如:** **例如:**
```md ```md
{{</* katex */>}} {{</* katex */>}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\) \(f(a,b,c) = (a^2+b^2+c^2)^3\)
``` ```
{{< katex >}} {{< katex >}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\) \(f(a,b,c) = (a^2+b^2+c^2)^3\)
查看 [数学符号示例]({{< ref "mathematical-notation" >}}) 页面以获取更多示例。 查看 [数学符号示例]({{< ref "mathematical-notation" >}}) 页面以获取更多示例。
+1 -1
View File
@@ -4,7 +4,7 @@ date: 2019-01-24
externalUrl: "https://n9o.xyz/projects/" externalUrl: "https://n9o.xyz/projects/"
summary: "The `externalUrl` front matter parameter can link to any URL." summary: "The `externalUrl` front matter parameter can link to any URL."
showReadingTime: true showReadingTime: true
_build: build:
render: "false" render: "false"
list: "local" list: "local"
type: 'sample' type: 'sample'
+1 -1
View File
@@ -4,7 +4,7 @@ date: 2019-01-24
externalUrl: "https://n9o.xyz/projects/" externalUrl: "https://n9o.xyz/projects/"
summary: "`externalUrl` 表示は任意の URL にリンクすることができます。" summary: "`externalUrl` 表示は任意の URL にリンクすることができます。"
showReadingTime: true showReadingTime: true
_build: build:
render: "false" render: "false"
list: "local" list: "local"
type: 'sample' type: 'sample'
+1 -1
View File
@@ -4,7 +4,7 @@ date: 2019-01-24
externalUrl: "https://n9o.xyz/projects/" externalUrl: "https://n9o.xyz/projects/"
summary: "The `externalUrl` front matter parameter can link to any URL." summary: "The `externalUrl` front matter parameter can link to any URL."
showReadingTime: true showReadingTime: true
_build: build:
render: "false" render: "false"
list: "local" list: "local"
type: 'sample' type: 'sample'
+1 -1
View File
@@ -4,7 +4,7 @@ date: 2019-01-24
externalUrl: "https://n9o.xyz/projects/" externalUrl: "https://n9o.xyz/projects/"
summary: "`externalUrl` front matter 参数可以链接到任何外部 URL." summary: "`externalUrl` front matter 参数可以链接到任何外部 URL."
showReadingTime: true showReadingTime: true
_build: build:
render: "false" render: "false"
list: "local" list: "local"
type: 'sample' type: 'sample'
@@ -66,6 +66,7 @@ The full list of built-in icons and their corresponding names can referenced bel
| language | {{< icon language >}} | | language | {{< icon language >}} |
| lastfm | {{< icon lastfm >}} | | lastfm | {{< icon lastfm >}} |
| lightbulb | {{< icon lightbulb >}} | | lightbulb | {{< icon lightbulb >}} |
| line | {{< icon line >}} |
| link | {{< icon link >}} | | link | {{< icon link >}} |
| linkedin | {{< icon linkedin >}} | | linkedin | {{< icon linkedin >}} |
| list | {{< icon list >}} | | list | {{< icon list >}} |
@@ -115,6 +116,7 @@ The full list of built-in icons and their corresponding names can referenced bel
| twitter | {{< icon twitter >}} | | twitter | {{< icon twitter >}} |
| wand-magic-sparkles | {{< icon wand-magic-sparkles >}} | | wand-magic-sparkles | {{< icon wand-magic-sparkles >}} |
| whatsapp | {{< icon whatsapp >}} | | whatsapp | {{< icon whatsapp >}} |
| worktree | {{< icon worktree >}} |
| x-twitter | {{< icon x-twitter >}} | | x-twitter | {{< icon x-twitter >}} |
| xing | {{< icon xing >}} | | xing | {{< icon xing >}} |
| xmark | {{< icon xmark >}} | | xmark | {{< icon xmark >}} |
@@ -66,6 +66,7 @@ Blowfish はいくつもの [FontAwesome 6](https://fontawesome.com/icons) の
| language | {{< icon language >}} | | language | {{< icon language >}} |
| lastfm | {{< icon lastfm >}} | | lastfm | {{< icon lastfm >}} |
| lightbulb | {{< icon lightbulb >}} | | lightbulb | {{< icon lightbulb >}} |
| line | {{< icon line >}} |
| link | {{< icon link >}} | | link | {{< icon link >}} |
| linkedin | {{< icon linkedin >}} | | linkedin | {{< icon linkedin >}} |
| list | {{< icon list >}} | | list | {{< icon list >}} |
@@ -66,6 +66,7 @@ The full list of built-in icons and their corresponding names can referenced bel
| language | {{< icon language >}} | | language | {{< icon language >}} |
| lastfm | {{< icon lastfm >}} | | lastfm | {{< icon lastfm >}} |
| lightbulb | {{< icon lightbulb >}} | | lightbulb | {{< icon lightbulb >}} |
| line | {{< icon line >}} |
| link | {{< icon link >}} | | link | {{< icon link >}} |
| linkedin | {{< icon linkedin >}} | | linkedin | {{< icon linkedin >}} |
| list | {{< icon list >}} | | list | {{< icon list >}} |
@@ -115,6 +116,7 @@ The full list of built-in icons and their corresponding names can referenced bel
| twitter | {{< icon twitter >}} | | twitter | {{< icon twitter >}} |
| wand-magic-sparkles | {{< icon wand-magic-sparkles >}} | | wand-magic-sparkles | {{< icon wand-magic-sparkles >}} |
| whatsapp | {{< icon whatsapp >}} | | whatsapp | {{< icon whatsapp >}} |
| worktree | {{< icon worktree >}} |
| x-twitter | {{< icon x-twitter >}} | | x-twitter | {{< icon x-twitter >}} |
| xing | {{< icon xing >}} | | xing | {{< icon xing >}} |
| xmark | {{< icon xmark >}} | | xmark | {{< icon xmark >}} |
@@ -66,6 +66,7 @@ Blowfish 内置了许多 [FontAwesome 6](https://fontawesome.com/icons) 中的
| language | {{< icon language >}} | | language | {{< icon language >}} |
| lastfm | {{< icon lastfm >}} | | lastfm | {{< icon lastfm >}} |
| lightbulb | {{< icon lightbulb >}} | | lightbulb | {{< icon lightbulb >}} |
| line | {{< icon line >}} |
| link | {{< icon link >}} | | link | {{< icon link >}} |
| linkedin | {{< icon linkedin >}} | | linkedin | {{< icon linkedin >}} |
| list | {{< icon list >}} | | list | {{< icon list >}} |
@@ -21,16 +21,16 @@ Any KaTeX syntax on that page will then be automatically rendered. Use the onlin
## Inline notation ## Inline notation
Inline notation can be generated by wrapping the expression in `\\(` and `\\)` delimiters. Inline notation can be generated by wrapping the expression in `\(` and `\)` delimiters.
**Example:** **Example:**
```tex ```tex
% KaTeX inline notation % KaTeX inline notation
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\) Inline notation: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
``` ```
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\) Inline notation: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
## Block notation ## Block notation
@@ -22,16 +22,16 @@ Blowfish は数学的記法を利用する場合のみ、 KaTeX アセットを
## インライン表記 ## インライン表記
インライン表記は `\\(` と `\\)` 記号で式を囲むことで生成できます。 インライン表記は `\(` と `\)` 記号で式を囲むことで生成できます。
**例:** **例:**
```tex ```tex
% KaTeX インライン表記 % KaTeX インライン表記
インライン表記: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\) インライン表記: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
``` ```
インライン表記: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\) インライン表記: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
## ブロック表記 ## ブロック表記
@@ -21,16 +21,16 @@ Any KaTeX syntax on that page will then be automatically rendered. Use the onlin
## Inline notation ## Inline notation
Inline notation can be generated by wrapping the expression in `\\(` and `\\)` delimiters. Inline notation can be generated by wrapping the expression in `\(` and `\)` delimiters.
**Example:** **Example:**
```tex ```tex
% KaTeX inline notation % KaTeX inline notation
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\) Inline notation: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
``` ```
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\) Inline notation: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
## Block notation ## Block notation
@@ -21,16 +21,16 @@ KaTeX 可用于在文章中呈现数学表达式。
## 内联表示法 ## 内联表示法
可以通过将表达式包装在 `\\(` 和 `\\)` 分隔符中来生成内联表示法。 可以通过将表达式包装在 `\(` 和 `\)` 分隔符中来生成内联表示法。
**例如:** **例如:**
```tex ```tex
% KaTeX inline notation % KaTeX inline notation
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\) Inline notation: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
``` ```
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\) Inline notation: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
## 表达式块 ## 表达式块
@@ -1,4 +1,4 @@
{{ $jsHome := resources.Get "js/home.js" | resources.Minify | resources.Fingerprint "sha512" }} {{ $jsHome := resources.Get "js/home.js" | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<div id="background"> <div id="background">
{{ partial "home/background.html" . }} {{ partial "home/background.html" . }}
</div> </div>
@@ -17,4 +17,8 @@
<section> <section>
{{ partial "recent-articles-demo.html" . }} {{ partial "recent-articles-demo.html" . }}
</section> </section>
<script defer type="text/javascript" src="{{ $jsHome.RelPermalink }}" integrity="{{ $jsHome.Data.Integrity }}"></script> <script
defer
type="text/javascript"
src="{{ $jsHome.RelPermalink }}"
integrity="{{ $jsHome.Data.Integrity }}"></script>
@@ -4,13 +4,16 @@
{{ $recentArticles = .Site.Params.homepage.showRecentItems }} {{ $recentArticles = .Site.Params.homepage.showRecentItems }}
{{ end }} {{ end }}
<h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_articles" | emojify }}</h2> <h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
<div class="flex mb-6 px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900"> <div class="flex mb-6 px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
<span class="flex items-center justify-between grow dark:text-neutral-300"> <span class="flex items-center justify-between grow dark:text-neutral-300">
<span class="prose dark:prose-invert">This is a demo of theme's list configurations: <code <span class="prose dark:prose-invert"
id="config">card view</code></span> >This is a demo of theme's list configurations: <code id="config">card view</code></span
<button id="switch-config-button" >
<button
id="switch-config-button"
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"> class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700">
Switch config &orarr; Switch config &orarr;
</button> </button>
+6 -10
View File
@@ -1,14 +1,14 @@
const fs = require('fs'); const fs = require("fs");
const configDir = "./exampleSite/config/_default"; const configDir = "./exampleSite/config/_default";
const contentDir = "./exampleSite/content"; const contentDir = "./exampleSite/content";
const defaultLang = "en"; const defaultLang = "en";
var targetLangs = [] var targetLangs = [];
function readConfigs() { function readConfigs() {
const files = fs.readdirSync(configDir); const files = fs.readdirSync(configDir);
files.forEach(file => { files.forEach((file) => {
//console.log(file) //console.log(file)
if (file.indexOf("languages.") > -1) { if (file.indexOf("languages.") > -1) {
var lang = file.split(".")[1]; var lang = file.split(".")[1];
@@ -22,7 +22,6 @@ function readConfigs() {
async function processFile(filePath, file) { async function processFile(filePath, file) {
if (filePath.indexOf("index.md") > -1) { if (filePath.indexOf("index.md") > -1) {
//console.log("processing", filePath) //console.log("processing", filePath)
for (var i in targetLangs) { for (var i in targetLangs) {
@@ -33,8 +32,8 @@ async function processFile(filePath, file) {
if (fs.existsSync(targetFilePath)) { if (fs.existsSync(targetFilePath)) {
//console.log("file already exists", targetFilePath); //console.log("file already exists", targetFilePath);
const data = fs.readFileSync(filePath, 'utf8'); const data = fs.readFileSync(filePath, "utf8");
const data2 = fs.readFileSync(targetFilePath, 'utf8'); const data2 = fs.readFileSync(targetFilePath, "utf8");
if (data != data2) { if (data != data2) {
//console.log("file contents are different", targetFilePath); //console.log("file contents are different", targetFilePath);
} else { } else {
@@ -42,14 +41,11 @@ async function processFile(filePath, file) {
console.log(targetFilePath); console.log(targetFilePath);
//process.exit(1); //process.exit(1);
} }
} else { } else {
//console.log("file does not exist", targetFilePath); //console.log("file does not exist", targetFilePath);
} }
} }
} else return;
} else
return
} }
async function processFolder(folderPath) { async function processFolder(folderPath) {
+10 -9
View File
@@ -1,5 +1,5 @@
const fs = require('fs'); const fs = require("fs");
const translate = require('@iamtraction/google-translate'); const translate = require("@iamtraction/google-translate");
const defaultLang = "en"; const defaultLang = "en";
const targetLang = process.argv[2] || "en"; const targetLang = process.argv[2] || "en";
@@ -10,7 +10,7 @@ const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
async function convert(text, from, to) { async function convert(text, from, to) {
var options = { var options = {
from: from, from: from,
to: to to: to,
}; };
var translated_text = await translate(text, options); var translated_text = await translate(text, options);
return translated_text.text; return translated_text.text;
@@ -26,12 +26,14 @@ async function processFrontMatter(block) {
if (array[i].indexOf(":") > -1) { if (array[i].indexOf(":") > -1) {
var elements = array[i].split(":"); var elements = array[i].split(":");
var newElement = ""; var newElement = "";
if (elements[0] == "title" || if (
elements[0] == "title" ||
elements[0] == "description" || elements[0] == "description" ||
elements[0] == "summary" || elements[0] == "summary" ||
elements[0] == "description" || elements[0] == "description" ||
elements[0] == "categories" || elements[0] == "categories" ||
elements[0] == "tags") { elements[0] == "tags"
) {
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1]; var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
newElement = elements[0] + ": " + translatedElement; newElement = elements[0] + ": " + translatedElement;
} else { } else {
@@ -45,11 +47,10 @@ async function processFrontMatter(block) {
return translatedBlock; return translatedBlock;
} }
async function main() { async function main() {
const fileContent = fs.readFileSync(filePath, 'utf8'); const fileContent = fs.readFileSync(filePath, "utf8");
var array = fileContent.split("---\n") var array = fileContent.split("---\n");
var frontMatter = array[1]; var frontMatter = array[1];
var content = array[2]; var content = array[2];
@@ -57,7 +58,7 @@ async function main() {
var translatedContent = await convert(content, defaultLang, targetLang); var translatedContent = await convert(content, defaultLang, targetLang);
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent; var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
fs.writeFileSync(targetFilePath, newFileContent, 'utf8'); fs.writeFileSync(targetFilePath, newFileContent, "utf8");
} }
main(); main();
+19 -23
View File
@@ -1,5 +1,5 @@
const fs = require('fs'); const fs = require("fs");
const translate = require('@iamtraction/google-translate'); const translate = require("@iamtraction/google-translate");
const configDir = "./exampleSite/config/_default"; const configDir = "./exampleSite/config/_default";
const contentDir = "./exampleSite/content"; const contentDir = "./exampleSite/content";
@@ -7,15 +7,13 @@ const defaultLang = "en";
const targetLang = process.argv[2] || "en"; const targetLang = process.argv[2] || "en";
const targetLangIso = targetLang == "pt" ? "pt-pt" : targetLang; const targetLangIso = targetLang == "pt" ? "pt-pt" : targetLang;
function createConfigs() { function createConfigs() {
const files = fs.readdirSync(configDir); const files = fs.readdirSync(configDir);
files.forEach(file => { files.forEach((file) => {
const filePath = `${configDir}/${file}`; const filePath = `${configDir}/${file}`;
if (filePath.indexOf("languages.en.toml") > -1 || if (filePath.indexOf("languages.en.toml") > -1 || filePath.indexOf("menus.en.toml") > -1) {
filePath.indexOf("menus.en.toml") > -1) { var fileContent = fs.readFileSync(filePath, "utf8");
var fileContent = fs.readFileSync(filePath, 'utf8'); fs.writeFileSync(filePath.replace(".en.toml", "." + targetLangIso + ".toml"), fileContent, "utf8");
fs.writeFileSync(filePath.replace(".en.toml", "." + targetLangIso + ".toml"), fileContent, 'utf8');
} }
}); });
} }
@@ -23,13 +21,12 @@ function createConfigs() {
async function convert(text, from, to) { async function convert(text, from, to) {
var options = { var options = {
from: from, from: from,
to: to to: to,
}; };
var translated_text = await translate(text, options) var translated_text = await translate(text, options).catch((err) => {
.catch(err => {
console.error(err); console.error(err);
});; });
return translated_text && translated_text.text? translated_text.text : ''; return translated_text && translated_text.text ? translated_text.text : "";
} }
async function processFrontMatter(block) { async function processFrontMatter(block) {
@@ -39,12 +36,14 @@ async function processFrontMatter(block) {
if (array[i].indexOf(":") > -1) { if (array[i].indexOf(":") > -1) {
var elements = array[i].split(":"); var elements = array[i].split(":");
var newElement = ""; var newElement = "";
if (elements[0] == "title" || if (
elements[0] == "title" ||
elements[0] == "description" || elements[0] == "description" ||
elements[0] == "summary" || elements[0] == "summary" ||
elements[0] == "description" || elements[0] == "description" ||
elements[0] == "categories" || elements[0] == "categories" ||
elements[0] == "tags") { elements[0] == "tags"
) {
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1]; var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
newElement = elements[0] + ": " + translatedElement; newElement = elements[0] + ": " + translatedElement;
} else { } else {
@@ -59,14 +58,13 @@ async function processFrontMatter(block) {
} }
async function processFile(filePath) { async function processFile(filePath) {
console.log("translating", filePath) console.log("translating", filePath);
if (filePath.indexOf("index.md") > -1) { if (filePath.indexOf("index.md") > -1) {
const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md"); const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
const fileContent = fs.readFileSync(filePath, 'utf8'); const fileContent = fs.readFileSync(filePath, "utf8");
var array = fileContent.split("---\n") var array = fileContent.split("---\n");
var frontMatter = array[1]; var frontMatter = array[1];
var content = array[2]; var content = array[2];
@@ -74,10 +72,8 @@ async function processFile(filePath) {
var translatedContent = await convert(content, defaultLang, targetLang); var translatedContent = await convert(content, defaultLang, targetLang);
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent; var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
fs.writeFileSync(targetFilePath, newFileContent, 'utf8'); fs.writeFileSync(targetFilePath, newFileContent, "utf8");
} else return;
} else
return
} }
async function processFolder(folderPath) { async function processFolder(folderPath) {
+7 -10
View File
@@ -1,18 +1,18 @@
const fs = require('fs'); const fs = require("fs");
const configDir = "./exampleSite/config/_default"; const configDir = "./exampleSite/config/_default";
const contentDir = "./exampleSite/content"; const contentDir = "./exampleSite/content";
const defaultLang = "en"; const defaultLang = "en";
var targetLangs = [] var targetLangs = [];
function readConfigs() { function readConfigs() {
const files = fs.readdirSync(configDir); const files = fs.readdirSync(configDir);
files.forEach(file => { files.forEach((file) => {
console.log(file) console.log(file);
if (file.indexOf("languages.") > -1) { if (file.indexOf("languages.") > -1) {
var lang = file.split(".")[1]; var lang = file.split(".")[1];
console.log(lang) console.log(lang);
if (lang != defaultLang) { if (lang != defaultLang) {
targetLangs.push(lang); targetLangs.push(lang);
} }
@@ -22,8 +22,7 @@ function readConfigs() {
async function processFile(filePath, file) { async function processFile(filePath, file) {
if (filePath.indexOf("index.md") > -1) { if (filePath.indexOf("index.md") > -1) {
console.log("processing", filePath);
console.log("processing", filePath)
for (var i in targetLangs) { for (var i in targetLangs) {
const targetLang = targetLangs[i]; const targetLang = targetLangs[i];
@@ -38,9 +37,7 @@ async function processFile(filePath, file) {
fs.copyFileSync(filePath, targetFilePath); fs.copyFileSync(filePath, targetFilePath);
} }
} }
} else return;
} else
return
} }
async function processFolder(folderPath) { async function processFolder(folderPath) {
+1
View File
@@ -58,6 +58,7 @@ search:
sharing: sharing:
email: "إرسال عبر البريد الإلكترونى" email: "إرسال عبر البريد الإلكترونى"
facebook: "النشر على فيسبوك" facebook: "النشر على فيسبوك"
line: "شارك على لاين"
linkedin: "النشر على لينكدان" linkedin: "النشر على لينكدان"
pinterest: "النشر على بينترست" pinterest: "النشر على بينترست"
reddit: "النشر على ريديت" reddit: "النشر على ريديت"
+1 -1
View File
@@ -26,7 +26,6 @@ article:
this_article: "Тази Статия" this_article: "Тази Статия"
related_articles: "Подобни" related_articles: "Подобни"
author: author:
byline_title: "Автор" byline_title: "Автор"
@@ -60,6 +59,7 @@ search:
sharing: sharing:
email: "Изпрати чрез имейл" email: "Изпрати чрез имейл"
facebook: "Сподели на Facebook" facebook: "Сподели на Facebook"
line: "Споделяне в LINE"
linkedin: "Сподели на LinkedIn" linkedin: "Сподели на LinkedIn"
pinterest: "Закачи в Pinterest" pinterest: "Закачи в Pinterest"
reddit: "Добави на Reddit" reddit: "Добави на Reddit"
+1
View File
@@ -59,6 +59,7 @@ search:
sharing: sharing:
email: "ইমেল করুন" email: "ইমেল করুন"
facebook: "ফেসবুকে শেয়ার করুন" facebook: "ফেসবুকে শেয়ার করুন"
line: "লাইনে শেয়ার করুন"
linkedin: "লিংকডইনে শেয়ার করুন" linkedin: "লিংকডইনে শেয়ার করুন"
pinterest: "পিন্টারেস্টে পিন করুন" pinterest: "পিন্টারেস্টে পিন করুন"
reddit: "রেড্ডিটে জমা দিন" reddit: "রেড্ডিটে জমা দিন"
+1
View File
@@ -62,6 +62,7 @@ search:
sharing: sharing:
email: "Enviar per correu electrònic" email: "Enviar per correu electrònic"
facebook: "Compartir amb Facebook" facebook: "Compartir amb Facebook"
line: "Compartir amb LINE"
linkedin: "Compartir amb LinkedIn" linkedin: "Compartir amb LinkedIn"
pinterest: "Compartir amb Pinterest" pinterest: "Compartir amb Pinterest"
reddit: "Publicar a Reddit" reddit: "Publicar a Reddit"
+1
View File
@@ -59,6 +59,7 @@ search:
sharing: sharing:
email: "Poslat emailem" email: "Poslat emailem"
facebook: "Sdílet na Facebook" facebook: "Sdílet na Facebook"
line: "Sdílejte na LINE"
linkedin: "Sdílet na LinkedIn" linkedin: "Sdílet na LinkedIn"
pinterest: "Připnout na Pinterest" pinterest: "Připnout na Pinterest"
reddit: "Přidat na Reddit" reddit: "Přidat na Reddit"
+1 -1
View File
@@ -53,6 +53,7 @@ search:
sharing: sharing:
email: "Per E-Mail teilen" email: "Per E-Mail teilen"
facebook: "Auf Facebook teilen" facebook: "Auf Facebook teilen"
line: "Auf LINE teilen"
linkedin: "Auf LinkedIn teilen" linkedin: "Auf LinkedIn teilen"
pinterest: "Auf Pinterest pinnen" pinterest: "Auf Pinterest pinnen"
reddit: "An Reddit senden" reddit: "An Reddit senden"
@@ -61,6 +62,5 @@ sharing:
shortcode: shortcode:
recent_articles: "Neue Beiträge" recent_articles: "Neue Beiträge"
recent: recent:
show_more: "Zeige Mehr" show_more: "Zeige Mehr"
+1
View File
@@ -62,6 +62,7 @@ search:
sharing: sharing:
email: "Send via email" email: "Send via email"
facebook: "Share on Facebook" facebook: "Share on Facebook"
line: "Share on LINE"
linkedin: "Share on LinkedIn" linkedin: "Share on LinkedIn"
pinterest: "Pin on Pinterest" pinterest: "Pin on Pinterest"
reddit: "Submit to Reddit" reddit: "Submit to Reddit"
+1
View File
@@ -62,6 +62,7 @@ search:
sharing: sharing:
email: "Sendi per retpoŝto" email: "Sendi per retpoŝto"
facebook: "Konigi en Facebook" facebook: "Konigi en Facebook"
line: "Konigi en LINE"
linkedin: "Konigi en LinkedIn" linkedin: "Konigi en LinkedIn"
pinterest: "Alpingli sur Pinterest" pinterest: "Alpingli sur Pinterest"
reddit: "Sendi al Reddit" reddit: "Sendi al Reddit"
+1
View File
@@ -62,6 +62,7 @@ search:
sharing: sharing:
email: "Enviar vía email" email: "Enviar vía email"
facebook: "Compartir en Facebook" facebook: "Compartir en Facebook"
line: "Compartir en LINE"
linkedin: "Compartir en LinkedIn" linkedin: "Compartir en LinkedIn"
pinterest: "Pinear en Pinterest" pinterest: "Pinear en Pinterest"
reddit: "Publicar en Reddit" reddit: "Publicar en Reddit"
+1
View File
@@ -62,6 +62,7 @@ search:
sharing: sharing:
email: "ارسال ایمیل" email: "ارسال ایمیل"
facebook: "اشتراک گذاری در فیسبوک" facebook: "اشتراک گذاری در فیسبوک"
line: "اشتراک گذاری در لاین"
linkedin: "اشتراک گذاری در لینکداین" linkedin: "اشتراک گذاری در لینکداین"
pinterest: "اشتراک گذاری در پینترست" pinterest: "اشتراک گذاری در پینترست"
reddit: "اشتراک گذاری در ردیت" reddit: "اشتراک گذاری در ردیت"
+1
View File
@@ -53,6 +53,7 @@ search:
sharing: sharing:
email: "Lähetä sähköpostilla" email: "Lähetä sähköpostilla"
facebook: "Jaa Facebookissa" facebook: "Jaa Facebookissa"
line: "Jaa LINEssä"
linkedin: "Jaa LinkedInissä" linkedin: "Jaa LinkedInissä"
pinterest: "Kiinnitä Pinterestiin" pinterest: "Kiinnitä Pinterestiin"
reddit: "Lähetä Reddittiin" reddit: "Lähetä Reddittiin"
+1
View File
@@ -56,6 +56,7 @@ search:
sharing: sharing:
email: "Envoyer par email" email: "Envoyer par email"
facebook: "Poster sur Facebook" facebook: "Poster sur Facebook"
line: "Partager sur LINE"
linkedin: "Poster sur LinkedIn" linkedin: "Poster sur LinkedIn"
pinterest: "Poster sur Pinterest" pinterest: "Poster sur Pinterest"
reddit: "Poster sur Reddit" reddit: "Poster sur Reddit"
+1
View File
@@ -62,6 +62,7 @@ search:
sharing: sharing:
email: "Enviar vía email" email: "Enviar vía email"
facebook: "Compartir en Facebook" facebook: "Compartir en Facebook"
line: "Compartir en LINE"
linkedin: "Compartir en LinkedIn" linkedin: "Compartir en LinkedIn"
pinterest: "Pinear en Pinterest" pinterest: "Pinear en Pinterest"
reddit: "Publicar en Reddit" reddit: "Publicar en Reddit"
+1
View File
@@ -53,6 +53,7 @@ search:
sharing: sharing:
email: "שליחת אימייל" email: "שליחת אימייל"
facebook: "שיתוף בפייסבוק" facebook: "שיתוף בפייסבוק"
line: "שיתוף בליין"
linkedin: "שיתוף בלינקדאין" linkedin: "שיתוף בלינקדאין"
pinterest: "שיתוף בפינטרסט" pinterest: "שיתוף בפינטרסט"
reddit: "שליחה לרדיט" reddit: "שליחה לרדיט"
+1
View File
@@ -59,6 +59,7 @@ search:
sharing: sharing:
email: "Pošalji putem e-pošte" email: "Pošalji putem e-pošte"
facebook: "Podijeli na Facebook" facebook: "Podijeli na Facebook"
line: "Podijeli na LINE"
linkedin: "Podijeli na LinkedIn" linkedin: "Podijeli na LinkedIn"
pinterest: "Podijeli na Pinterest" pinterest: "Podijeli na Pinterest"
reddit: "Objavi na Reddit" reddit: "Objavi na Reddit"
+1
View File
@@ -53,6 +53,7 @@ search:
sharing: sharing:
email: "Küldés emailben" email: "Küldés emailben"
facebook: "Megosztás a Facebookon" facebook: "Megosztás a Facebookon"
line: "Megosztás a LINE-on"
linkedin: "Megosztás a LinkedInen" linkedin: "Megosztás a LinkedInen"
pinterest: "Megosztás a Pinteresten" pinterest: "Megosztás a Pinteresten"
reddit: "Megosztás a Redditen" reddit: "Megosztás a Redditen"
+1
View File
@@ -59,6 +59,7 @@ search:
sharing: sharing:
email: "Kirim lewat surel" email: "Kirim lewat surel"
facebook: "Bagikan ke Facebook" facebook: "Bagikan ke Facebook"
line: "Bagikan ke LINE"
linkedin: "Bagikan ke LinkedIn" linkedin: "Bagikan ke LinkedIn"
pinterest: "Pin di Pinterest" pinterest: "Pin di Pinterest"
reddit: "Kirim ke Reddit" reddit: "Kirim ke Reddit"
+1
View File
@@ -53,6 +53,7 @@ search:
sharing: sharing:
email: "Invia tramite email" email: "Invia tramite email"
facebook: "Condividi su Facebook" facebook: "Condividi su Facebook"
line: "Condividi su LINE"
linkedin: "Condividi su LinkedIn" linkedin: "Condividi su LinkedIn"
pinterest: "Pinna su Pinterest" pinterest: "Pinna su Pinterest"
reddit: "Invia a Reddit" reddit: "Invia a Reddit"
+3 -2
View File
@@ -38,13 +38,13 @@ code:
error: error:
404_title: "ページが見つかりませんでした。 :confused:" 404_title: "ページが見つかりませんでした。 :confused:"
404_error: "Error 404" 404_error: "404エラー"
404_description: "ご要望のページは存在しないようです。" 404_description: "ご要望のページは存在しないようです。"
footer: footer:
dark_appearance: "ダークモードへ切り替え" dark_appearance: "ダークモードへ切り替え"
light_appearance: "ライトモードへ切り替え" light_appearance: "ライトモードへ切り替え"
powered_by: "Powered by {{ .Hugo }} &amp; {{ .Theme }}" powered_by: "{{ .Hugo }} &amp; {{ .Theme }} で構築されています"
list: list:
externalurl_title: "外部サイトへリンク" externalurl_title: "外部サイトへリンク"
@@ -62,6 +62,7 @@ search:
sharing: sharing:
email: " Eメールを送る" email: " Eメールを送る"
facebook: "Facebookでシェアする" facebook: "Facebookでシェアする"
line: "LINEでシェアする"
linkedin: "LinkedInでシェアする" linkedin: "LinkedInでシェアする"
pinterest: "Pinterestでピンする" pinterest: "Pinterestでピンする"
reddit: "Redditに投稿する" reddit: "Redditに投稿する"
+1
View File
@@ -59,6 +59,7 @@ search:
sharing: sharing:
email: "이메일로 전송" email: "이메일로 전송"
facebook: "Facebook에서 공유" facebook: "Facebook에서 공유"
line: "LINE에 공유하기"
linkedin: "LinkedIn에서 공유" linkedin: "LinkedIn에서 공유"
pinterest: "Pinterest에 고정" pinterest: "Pinterest에 고정"
reddit: "Reddit에 게시" reddit: "Reddit에 게시"
+1
View File
@@ -62,6 +62,7 @@ search:
sharing: sharing:
email: "Delen via email" email: "Delen via email"
facebook: "Delen op Facebook" facebook: "Delen op Facebook"
line: "Delen op LINE"
linkedin: "Delen op LinkedIn" linkedin: "Delen op LinkedIn"
pinterest: "Delen op Pinterest" pinterest: "Delen op Pinterest"
reddit: "Indienen op Reddit" reddit: "Indienen op Reddit"
+3 -1
View File
@@ -36,7 +36,8 @@ code:
error: error:
404_title: "Strona nie znaleziona :confused:" 404_title: "Strona nie znaleziona :confused:"
404_error: "Błąd 404" 404_error: "Błąd 404"
404_description: "Wydaje się, że strona, którą chcesz wyświetlić, nie istnieje." 404_description:
"Wydaje się, że strona, którą chcesz wyświetlić, nie istnieje."
footer: footer:
dark_appearance: "Zmień na tryb ciemny" dark_appearance: "Zmień na tryb ciemny"
@@ -59,6 +60,7 @@ search:
sharing: sharing:
email: "Wyślij jako email" email: "Wyślij jako email"
facebook: "Udostępnij na Facebooku" facebook: "Udostępnij na Facebooku"
line: "Udostępnij na LINE"
linkedin: "Udostępnij na LinkedInie" linkedin: "Udostępnij na LinkedInie"
pinterest: "Przypnij na Pinterest" pinterest: "Przypnij na Pinterest"
reddit: "Prześlij na Reddita" reddit: "Prześlij na Reddita"
+1
View File
@@ -56,6 +56,7 @@ search:
sharing: sharing:
email: "Enviar por email" email: "Enviar por email"
facebook: "Compartilhar pelo Facebook" facebook: "Compartilhar pelo Facebook"
line: "Compartilhar pelo LINE"
linkedin: "Compartilhar pelo LinkedIn" linkedin: "Compartilhar pelo LinkedIn"
pinterest: "Pin no Pinterest" pinterest: "Pin no Pinterest"
reddit: "Postar no Reddit" reddit: "Postar no Reddit"
+1
View File
@@ -56,6 +56,7 @@ search:
sharing: sharing:
email: "Partilhar por email" email: "Partilhar por email"
facebook: "Partilhar pelo Facebook" facebook: "Partilhar pelo Facebook"
line: "Partilhar pelo LINE"
linkedin: "Partilhar pelo LinkedIn" linkedin: "Partilhar pelo LinkedIn"
pinterest: "Partilhar no Pinterest" pinterest: "Partilhar no Pinterest"
reddit: "Partilhar no Reddit" reddit: "Partilhar no Reddit"
+1
View File
@@ -53,6 +53,7 @@ search:
sharing: sharing:
email: "Trimite pe email" email: "Trimite pe email"
facebook: "Postează pe Facebook" facebook: "Postează pe Facebook"
line: "Postează LINE"
linkedin: "Postează LinkedIn" linkedin: "Postează LinkedIn"
pinterest: "Pune pe Pinterest" pinterest: "Pune pe Pinterest"
reddit: "Postează pe Reddit" reddit: "Postează pe Reddit"
+1
View File
@@ -59,6 +59,7 @@ search:
sharing: sharing:
email: "Отправить по электронной почте" email: "Отправить по электронной почте"
facebook: "Поделиться через Facebook" facebook: "Поделиться через Facebook"
line: "Поделиться через LINE"
linkedin: "Поделиться через LinkedIn" linkedin: "Поделиться через LinkedIn"
pinterest: "Добавить в Pinterest" pinterest: "Добавить в Pinterest"
reddit: "Отправить в Reddit" reddit: "Отправить в Reddit"
Loaded 100 of 188 files, more files were not shown because too many files have changed in this diff. Show more