Merge remote-tracking branch 'origin/main' into ar-translation
|
@ -148,8 +148,8 @@ fi
|
|||
# Ensure JavaScript files are minified. #
|
||||
##################################################################
|
||||
|
||||
# Get the newly added and modified files.
|
||||
mapfile -t all_changed_files < <(git diff --cached --name-only)
|
||||
# Get the newly added and modified files, but not deleted files.
|
||||
mapfile -t all_changed_files < <(git diff --cached --name-only --diff-filter=d)
|
||||
|
||||
script_name=$(basename "$0")
|
||||
# Loop through all newly added or modified files.
|
||||
|
|
62
.github/ISSUE_TEMPLATE/2_bug_report.yml
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
name: "🐛 Bug report"
|
||||
description: "Did you run into an issue while using tabi?"
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "System information"
|
||||
description: |
|
||||
Please provide the following information:
|
||||
- Zola version: Run `zola --version`
|
||||
- tabi version or commit hash
|
||||
placeholder: |
|
||||
Zola version:
|
||||
tabi version or commit:
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Expected behaviour"
|
||||
description: "Tell us what should have happened."
|
||||
placeholder: "Describe what you expected tabi to do…"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Actual behaviour"
|
||||
description: "Tell us what happens instead of the expected behavior."
|
||||
placeholder: "Describe what actually happened…"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Steps to reproduce"
|
||||
description: "Please provide detailed steps to reproduce the issue."
|
||||
placeholder: |
|
||||
1. Set up `config.toml` with these settings: …
|
||||
2. Create content with this structure: …
|
||||
3. Run Zola with these arguments: …
|
||||
4. See the following error: …
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Additional context"
|
||||
description: >
|
||||
Please provide any relevant configuration files, error messages, or screenshots that might help us understand the issue.
|
||||
You can drag and drop files here to attach them.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "Final checklist"
|
||||
options:
|
||||
- label: "I've checked that the issue isn't already reported."
|
||||
required: true
|
||||
- label: "I've tested with the latest version of tabi to check if the issue has already been fixed."
|
||||
required: true
|
34
.github/ISSUE_TEMPLATE/3_feature_request.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: "✨ Feature request"
|
||||
description: "Suggest an idea for tabi"
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Summary and motivation"
|
||||
description: "Briefly describe the feature and why it would be valuable for tabi users."
|
||||
placeholder: |
|
||||
Describe:
|
||||
- What the feature is
|
||||
- Why it would be useful
|
||||
- Any examples from other projects
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Implementation details"
|
||||
description: "Share any ideas you have about how this could be implemented."
|
||||
placeholder: "Technical suggestions, potential approaches, or specific requirements."
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "Checklist"
|
||||
options:
|
||||
- label: "I've searched existing issues to make sure this feature hasn't already been requested."
|
||||
required: true
|
||||
- label: "This feature aligns with tabi's philosophy (minimal JS, accessible…)"
|
||||
required: true
|
||||
- label: "I'm willing to contribute to the implementation of this feature."
|
||||
required: false
|
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -1,24 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Did you run into an issue while using tabi?
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Bug Report
|
||||
|
||||
## Environment
|
||||
|
||||
Zola version:
|
||||
tabi version or commit:
|
||||
|
||||
## Expected Behavior
|
||||
Tell us what should have happened.
|
||||
|
||||
## Current Behavior
|
||||
Tell us what happens instead of the expected behavior.
|
||||
|
||||
## Step to Reproduce
|
||||
Please provide the steps to reproduce the issue.
|
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 💬 tabi discussions
|
||||
url: https://github.com/welpo/tabi/discussions
|
||||
about: If you have questions or need help, feel free to ask here~
|
22
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
@ -1,22 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project.
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Feature Request
|
||||
|
||||
## Summary
|
||||
Briefly describe what this feature request is about.
|
||||
|
||||
## Motivation
|
||||
Why should this feature be implemented? How will it benefit the project and its users?
|
||||
|
||||
## Detailed Description
|
||||
Please provide a detailed description of the proposed feature, including any suggestions you have for how it could be implemented.
|
||||
|
||||
## Additional Context
|
||||
Add any other context or screenshots about the feature request here. If this feature request is related to a problem, please describe it.
|
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -58,6 +58,7 @@ If you need help, please ask! -->
|
|||
- [ ] I have verified the accessibility of my changes
|
||||
- [ ] I have tested all possible scenarios for this change
|
||||
- [ ] I have updated `theme.toml` with a sane default for the feature
|
||||
- [ ] I have updated `config.toml` in [tabi-start](https://github.com/welpo/tabi-start)
|
||||
- [ ] I have made corresponding changes to the documentation:
|
||||
- [ ] Updated `config.toml` comments
|
||||
- [ ] Updated `theme.toml` comments
|
||||
|
|
10
.github/renovate.json
vendored
|
@ -1,9 +1,13 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:recommended", ":automergeMinor", ":disableDependencyDashboard"],
|
||||
"commitMessageAction": "chore(deps): update",
|
||||
"commitMessagePrefix": "⬆️",
|
||||
"commitMessageAction": "chore(deps): update",
|
||||
"commitMessageTopic": "{{{depName}}}",
|
||||
"labels": ["dependencies"],
|
||||
"git-submodules": {
|
||||
"enabled": true
|
||||
},
|
||||
"packageRules": [
|
||||
{
|
||||
"updateTypes": ["pin"],
|
||||
|
@ -16,6 +20,10 @@
|
|||
{
|
||||
"updateTypes": ["rollback"],
|
||||
"commitMessagePrefix": "⬇️"
|
||||
},
|
||||
{
|
||||
"matchFileNames": ["scripts/release/**"],
|
||||
"automerge": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
2
.github/workflows/cd.yml
vendored
|
@ -8,7 +8,7 @@ on:
|
|||
jobs:
|
||||
deploy:
|
||||
name: Deploy and release
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
|
|
8
.github/workflows/ci.yml
vendored
|
@ -18,26 +18,26 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
|
||||
- name: Zola Build
|
||||
uses: shalzz/zola-deploy-action@v0.19.2
|
||||
uses: shalzz/zola-deploy-action@v0.20.0
|
||||
env:
|
||||
BUILD_ONLY: true
|
||||
|
||||
- name: Zola Check
|
||||
uses: shalzz/zola-deploy-action@v0.19.2
|
||||
uses: shalzz/zola-deploy-action@v0.20.0
|
||||
env:
|
||||
BUILD_ONLY: true
|
||||
CHECK_LINKS: true
|
||||
|
||||
build_and_deploy:
|
||||
name: Build and Deploy on Main Push
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build and Deploy
|
||||
uses: shalzz/zola-deploy-action@v0.19.2
|
||||
uses: shalzz/zola-deploy-action@v0.20.0
|
||||
env:
|
||||
PAGES_BRANCH: gh-pages
|
||||
TOKEN: ${{ secrets.TOKEN }}
|
||||
|
|
9
.github/workflows/git-sumi.yml
vendored
|
@ -8,14 +8,21 @@ on:
|
|||
- synchronize
|
||||
- ready_for_review
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
main:
|
||||
name: Run git-sumi
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Set header length for dependency updates
|
||||
if: contains(github.event.pull_request.title, 'chore(deps)')
|
||||
run: echo "GIT_SUMI_MAX_HEADER_LENGTH=80" >> $GITHUB_ENV
|
||||
- uses: welpo/git-sumi-action@main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
89
.github/workflows/upgrade-deps.yml
vendored
Normal file
|
@ -0,0 +1,89 @@
|
|||
name: Dependency upgrade
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dependency:
|
||||
description: 'Dependency to upgrade'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- all
|
||||
- mermaid
|
||||
- katex
|
||||
schedule:
|
||||
- cron: '32 4 * * *'
|
||||
|
||||
jobs:
|
||||
upgrade-dependency:
|
||||
name: Upgrade dependency
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
strategy:
|
||||
matrix:
|
||||
dependency: ${{ github.event_name == 'schedule' && fromJson('["mermaid", "katex"]') || fromJson(format('["{0}"]', github.event.inputs.dependency)) }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y jq npm curl git
|
||||
npm install uglify-js -g
|
||||
uglifyjs --version
|
||||
|
||||
- name: Configure GPG key
|
||||
run: |
|
||||
echo -n ${{ secrets.GPG_PRIVATE_KEY }} | base64 --decode | gpg --import
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.signingkey 33EACFE956484C3940BFEEDCE4EC28F8DFB57474
|
||||
git config --global commit.gpgsign true
|
||||
git config --global user.name "welpo"
|
||||
git config --global user.email "welpo@users.noreply.github.com"
|
||||
|
||||
- name: Check for existing branch
|
||||
id: check_branch
|
||||
run: |
|
||||
if git ls-remote --heads origin deps/upgrade-${{ matrix.dependency }} | grep -q deps/upgrade-${{ matrix.dependency }}; then
|
||||
echo "branch_exists=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "branch_exists=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Handle existing branch
|
||||
if: steps.check_branch.outputs.branch_exists == 'true'
|
||||
run: |
|
||||
echo "Branch deps/upgrade-${{ matrix.dependency }} already exists."
|
||||
echo "Skipping upgrade as there's already an open PR"
|
||||
exit 0
|
||||
|
||||
- name: Create and switch to new branch
|
||||
run: |
|
||||
git checkout -b deps/upgrade-${{ matrix.dependency }}
|
||||
|
||||
- name: Run upgrade script
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ matrix.dependency }}" == "all" ]]; then
|
||||
bash scripts/upgrade-deps --all
|
||||
else
|
||||
bash scripts/upgrade-deps --${{ matrix.dependency }}
|
||||
fi
|
||||
|
||||
- name: Push changes and create PR
|
||||
shell: bash
|
||||
run: |
|
||||
if git diff --quiet HEAD origin/main; then
|
||||
echo "No changes to push for ${{ matrix.dependency }}"
|
||||
exit 0
|
||||
fi
|
||||
git push -u origin deps/upgrade-${{ matrix.dependency }}
|
||||
gh pr create --fill --base main --head deps/upgrade-${{ matrix.dependency }} --label "dependencies"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "scripts/release"]
|
||||
path = scripts/release
|
||||
url = https://github.com/welpo/release.git
|
142
CHANGELOG.md
|
@ -4,6 +4,142 @@ Welcome to the changelog for tabi. This document aims to provide a comprehensive
|
|||
|
||||
We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR.MINOR.PATCH. Major version changes involve significant (breaking) changes, minor versions introduce features and improvements in a backward compatible manner, and patch versions are for bug fixes and minor tweaks.
|
||||
|
||||
## [3.1.0](https://github.com/welpo/tabi/compare/v3.0.0..v3.1.0) - 2024-11-14
|
||||
|
||||
### ✨ Features
|
||||
|
||||
- *(shortcodes)* Support body admonitions ([#423](https://github.com/welpo/tabi/issues/423)) by [@welpo](https://github.com/welpo)
|
||||
- Allow pinned posts with pagination ([#428](https://github.com/welpo/tabi/issues/428)) by [@welpo](https://github.com/welpo)
|
||||
- Add pinned posts functionality ([#424](https://github.com/welpo/tabi/issues/424)) by [@welpo](https://github.com/welpo)
|
||||
- Add series functionality ([#406](https://github.com/welpo/tabi/issues/406)) by [@ZzMzaw](https://github.com/ZzMzaw) and [@welpo](https://github.com/welpo)
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Link to "All posts" in non-default-language root ([3b7fd3d](https://github.com/welpo/tabi/commit/3b7fd3db9c33fd3ca6114ca00fffa2a91f682a0a)) by [@welpo](https://github.com/welpo)
|
||||
- Isso comments in multilingual setups ([#427](https://github.com/welpo/tabi/issues/427)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 💄 Styling
|
||||
|
||||
- Colour scrollbar to match primary colour ([#430](https://github.com/welpo/tabi/issues/430)) by [@welpo](https://github.com/welpo)
|
||||
- Set accent color to match theme ([#429](https://github.com/welpo/tabi/issues/429)) by [@welpo](https://github.com/welpo)
|
||||
- Fix info admonition code color ([5927409](https://github.com/welpo/tabi/commit/5927409c41e71d6943deee426fc75a94037cee36)) by [@welpo](https://github.com/welpo)
|
||||
- Improve navigation bar & metadata wrapping ([#425](https://github.com/welpo/tabi/issues/425)) by [@welpo](https://github.com/welpo)
|
||||
- Fix hover color for <rt> element in links ([87f1099](https://github.com/welpo/tabi/commit/87f1099caa8741bcacadf2aae2677a529395e454)) by [@welpo](https://github.com/welpo)
|
||||
- Add styling for <kbd> keyboard input ([51fee5d](https://github.com/welpo/tabi/commit/51fee5d660232a1eafeb39f439fe5377f3f63406)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 📝 Documentation
|
||||
|
||||
- *(README)* Fix typo ([#421](https://github.com/welpo/tabi/issues/421)) by [@ZzMzaw](https://github.com/ZzMzaw)
|
||||
- Highlight pinned posts feature ([c3c344a](https://github.com/welpo/tabi/commit/c3c344a76fb894ec87fc9896e7a0202788e001c5)) by [@welpo](https://github.com/welpo)
|
||||
- Clarify instructions for listing recent posts ([#418](https://github.com/welpo/tabi/issues/418)) ([3442fd9](https://github.com/welpo/tabi/commit/3442fd9ff0c0a093f08bb27aaa0d92e5993df29b)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### ♻️ Refactor
|
||||
|
||||
- *(GitHub)* Update issue templates ([5687f3b](https://github.com/welpo/tabi/commit/5687f3bacb6ed69ffbe4143e93b6c95ce8fb5c59)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 🔧 Miscellaneous tasks
|
||||
|
||||
- *(CI)* Allow longer PR titles for dep updates ([e2c5c6e](https://github.com/welpo/tabi/commit/e2c5c6e9b749c3591af6a822eee65c1ee1854c01)) by [@welpo](https://github.com/welpo)
|
||||
- *(CI)* Allow longer PR titles for dep updates ([fa9f160](https://github.com/welpo/tabi/commit/fa9f16034241ccee6229ef0279b3b9bc65249cfa)) by [@welpo](https://github.com/welpo)
|
||||
- *(CI)* Allow longer PR titles for dep updates ([bd45a1a](https://github.com/welpo/tabi/commit/bd45a1ae45997b950c703d1ebf1e34b3b82173eb)) by [@welpo](https://github.com/welpo)
|
||||
- *(deps)* Remove local release script ([2e3cff2](https://github.com/welpo/tabi/commit/2e3cff2ef1ca8396c632de48b21174601d5ff46c)) by [@welpo](https://github.com/welpo)
|
||||
- *(projects)* Add ラム (ramu) project ([f300129](https://github.com/welpo/tabi/commit/f3001298c24d49d234247c9cce2a6c771778c1c3)) by [@welpo](https://github.com/welpo)
|
||||
- Change codeblock language from plaintext to txt ([57a0a8e](https://github.com/welpo/tabi/commit/57a0a8e1a09d586acdf5c72464d79328e0c9b27f)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
## [3.0.0](https://github.com/welpo/tabi/compare/v2.17.0..v3.0.0) - 2024-10-18
|
||||
|
||||
### 💥 BREAKING CHANGES 💥
|
||||
|
||||
- Force code blocks LTR rendering ([#412](https://github.com/welpo/tabi/issues/412)) ([092ccdd](https://github.com/welpo/tabi/commit/092ccdd1ba8bf08cc738664ba4fbe9e7a0ff282e)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### ✨ Features
|
||||
|
||||
- Add force_text_direction shortcode ([#414](https://github.com/welpo/tabi/issues/414)) ([c9f8d27](https://github.com/welpo/tabi/commit/c9f8d27b962217ff0fb09b30ec14aee65fe8518d)) by [@welpo](https://github.com/welpo)
|
||||
- [**‼️BREAKING‼️**] Force code blocks LTR rendering ([#412](https://github.com/welpo/tabi/issues/412)) ([092ccdd](https://github.com/welpo/tabi/commit/092ccdd1ba8bf08cc738664ba4fbe9e7a0ff282e)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Update CSP for GoatCounter ([#413](https://github.com/welpo/tabi/issues/413)) by [@noeddl](https://github.com/noeddl)
|
||||
|
||||
### 📝 Documentation
|
||||
|
||||
- *(CONTRIBUTING)* Fix broken link to commit message style ([11e246a](https://github.com/welpo/tabi/commit/11e246a876eef846e8c1e26add7331f25beb9c27)) by [@welpo](https://github.com/welpo)
|
||||
- *(mastering tabi)* Mention social links rel='me' ([5db70b7](https://github.com/welpo/tabi/commit/5db70b7978e7141be9396d3f69375a87b2d44ed2)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 🔧 Miscellaneous tasks
|
||||
|
||||
- Update git-cliff variables to `commit.remote` ([0a36ef5](https://github.com/welpo/tabi/commit/0a36ef55ee092fe7bb1f8803c04a4cb8245b2a13)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 👥 New contributors
|
||||
|
||||
🫶 [@noeddl](https://github.com/noeddl) made their first contribution in [#413](https://github.com/welpo/tabi/pull/413)
|
||||
|
||||
## [2.17.0](https://github.com/welpo/tabi/compare/v2.16.0..v2.17.0) - 2024-10-10
|
||||
|
||||
### ✨ Features
|
||||
|
||||
- Add fediverse creator metadata support ([#409](https://github.com/welpo/tabi/issues/409)) by [@arichtman](https://github.com/arichtman), [@Ariel](https://github.com/Ariel) Richtman and [@welpo](https://github.com/welpo)
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- *(search)* Restore highlighting functionality ([#401](https://github.com/welpo/tabi/issues/401)) by [@welpo](https://github.com/welpo)
|
||||
- Set proper URL for self-hosted Umami ([#402](https://github.com/welpo/tabi/issues/402)) by [@soumendrak](https://github.com/soumendrak)
|
||||
|
||||
### 📝 Documentation
|
||||
|
||||
- Add mermaid shortcode usage ([#407](https://github.com/welpo/tabi/issues/407)) by [@ZzMzaw](https://github.com/ZzMzaw) and [@welpo](https://github.com/welpo)
|
||||
- Update comment in config.toml RE: #402 ([c50edbd](https://github.com/welpo/tabi/commit/c50edbd453eca2f031bc97a5a25caa206644d568)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### ♻️ Refactor
|
||||
|
||||
- *(search)* Reduce search lag on mobile ([7ceada9](https://github.com/welpo/tabi/commit/7ceada974b7c3f2c52aaa5688af631c806901aed)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 🔧 Miscellaneous tasks
|
||||
|
||||
- *(README)* Add jmbhughes.com to showcase ([#404](https://github.com/welpo/tabi/issues/404)) by [@jmbhughes](https://github.com/jmbhughes)
|
||||
- *(deps)* Replace local release script w/ git submodule ([66239be](https://github.com/welpo/tabi/commit/66239bee016406c87a227b685eb70a464546e199)) by [@welpo](https://github.com/welpo)
|
||||
- *(deps)* Automate KaTeX/mermaid upgrades ([fc04ab4](https://github.com/welpo/tabi/commit/fc04ab4e40977bafa1b821c77e38554d287f69bc)) by [@welpo](https://github.com/welpo)
|
||||
- Reformat social card creation tip ([47fcee8](https://github.com/welpo/tabi/commit/47fcee8f81fb10bcd7cc042cc4a80dcada244b6d)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 👥 New contributors
|
||||
|
||||
🫶 [@jmbhughes](https://github.com/jmbhughes) made their first contribution in [#404](https://github.com/welpo/tabi/pull/404)
|
||||
|
||||
## [2.16.0](https://github.com/welpo/tabi/compare/v2.15.0..v2.16.0) - 2024-09-22
|
||||
|
||||
### ✨ Features
|
||||
|
||||
- *(remote_text shortcode)* Support line ranges ([#399](https://github.com/welpo/tabi/issues/399)) ([008b976](https://github.com/welpo/tabi/commit/008b976e06e0b93e021e2ca641eda42521e58f98)) by [@welpo](https://github.com/welpo)
|
||||
- *(remote_text shortcode)* Support relative paths ([#398](https://github.com/welpo/tabi/issues/398)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
## [2.15.0](https://github.com/welpo/tabi/compare/v2.14.0..v2.15.0) - 2024-09-20
|
||||
|
||||
### ✨ Features
|
||||
|
||||
- *(feed)* Make "Visit website" link context-aware ([#394](https://github.com/welpo/tabi/issues/394)) by [@welpo](https://github.com/welpo)
|
||||
- *(search)* Hide "clear search" icon if input is empty ([#388](https://github.com/welpo/tabi/issues/388)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- *(feed)* Resolve Atom feed validation issues ([#393](https://github.com/welpo/tabi/issues/393)) by [@welpo](https://github.com/welpo)
|
||||
- Allow pages within pages ([#385](https://github.com/welpo/tabi/issues/385)) by [@welpo](https://github.com/welpo)
|
||||
- Improve dark mode and OS theme handling ([#380](https://github.com/welpo/tabi/issues/380)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 💄 Styling
|
||||
|
||||
- Improve RTL styling consistency ([#381](https://github.com/welpo/tabi/issues/381)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 🔧 Miscellaneous tasks
|
||||
|
||||
- *(README)* Add Ponderosa Games to showcase ([#395](https://github.com/welpo/tabi/issues/395)) by [@JVimes](https://github.com/JVimes)
|
||||
- *(deps)* Avoid masking return values ([1b11f4b](https://github.com/welpo/tabi/commit/1b11f4b321d0ae52179d88cc3ecd1b72ef2b37ae)) by [@welpo](https://github.com/welpo)
|
||||
- *(deps)* Check local deps version to early exit ([b5cbad4](https://github.com/welpo/tabi/commit/b5cbad422bc14f44a620bcbb87449f2425c16af6)) by [@welpo](https://github.com/welpo)
|
||||
- Set [@TheAwiteb](https://github.com/TheAwiteb) as owner of Arabic translation ([edb0873](https://github.com/welpo/tabi/commit/edb087392f2989b4f08122c81fa3e51d17fbb6b8)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 👥 New contributors
|
||||
|
||||
🫶 [@JVimes](https://github.com/JVimes) made their first contribution in [#395](https://github.com/welpo/tabi/pull/395)
|
||||
|
||||
## [2.14.0](https://github.com/welpo/tabi/compare/v2.13.0..v2.14.0) - 2024-09-08
|
||||
|
||||
### ✨ Features
|
||||
|
@ -39,8 +175,6 @@ We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR.
|
|||
|
||||
### 👥 New contributors
|
||||
|
||||
🫶 [@soumendrak](https://github.com/soumendrak) made their first contribution in [#372](https://github.com/welpo/tabi/pull/372)
|
||||
|
||||
🫶 [@DataTriny](https://github.com/DataTriny) made their first contribution in [#367](https://github.com/welpo/tabi/pull/367)
|
||||
|
||||
🫶 [@NippleOfAnApe](https://github.com/NippleOfAnApe) made their first contribution in [#365](https://github.com/welpo/tabi/pull/365)
|
||||
|
@ -104,7 +238,7 @@ We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR.
|
|||
|
||||
### ✨ Features
|
||||
|
||||
- *(socials)* Add bluesky icon ([#333](https://github.com/welpo/tabi/issues/333)) by [@gacallea](https://github.com/gacallea)
|
||||
- *(socials)* Add bluesky icon ([#333](https://github.com/welpo/tabi/issues/333)) by [@andreacfromtheapp](https://github.com/andreacfromtheapp)
|
||||
- Allow HTML tags in multilingual quote author ([be7628a](https://github.com/welpo/tabi/commit/be7628aeaa573b69739a2751e93d77da0b587124)) by [@welpo](https://github.com/welpo)
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
@ -128,7 +262,7 @@ We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR.
|
|||
|
||||
### 👥 New contributors
|
||||
|
||||
🫶 [@gacallea](https://github.com/gacallea) made their first contribution in [#333](https://github.com/welpo/tabi/pull/333)
|
||||
🫶 [@andreacfromtheapp](https://github.com/andreacfromtheapp) made their first contribution in [#333](https://github.com/welpo/tabi/pull/333)
|
||||
|
||||
## [2.10.0](https://github.com/welpo/tabi/compare/v2.9.0..v2.10.0) - 2024-05-30
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Working on your first Pull Request? You can learn how from this free video serie
|
|||
Please make sure the following is done when submitting a pull request:
|
||||
|
||||
1. **Keep your PR small**. Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
|
||||
2. **Use descriptive titles**. It is recommended to follow this [commit message style](#conventional-commit-messages).
|
||||
2. **Use descriptive titles**. It is recommended to follow this [commit message style](#conventional-commit-messages-with-gitmoji).
|
||||
3. **Test your changes**. Make sure to test different configurations that might affect your changes.
|
||||
4. **Fill the PR template**. The template will guide you through the process of submitting a PR.
|
||||
|
||||
|
@ -37,7 +37,7 @@ Format: `<gitmoji> <type>(<scope>): <description>`
|
|||
|
||||
`<gitmoji>` is an emoji from the [gitmoji](https://gitmoji.dev/) list. It makes it easier to visually scan the commit history and quickly grasp the purpose of changes.
|
||||
|
||||
`<scope>` is optional. If your change affects a specific part of the codebase, consider adding the scope. Scopes should be brief but recognizable, e.g. `config`, `gitmoji`, or `cli`.
|
||||
`<scope>` is optional. If your change affects a specific part of the codebase, consider adding the scope. Scopes should be brief but recognizable, e.g. `config`, `feed`, or `search`.
|
||||
|
||||
The various types of commits:
|
||||
|
||||
|
@ -47,7 +47,7 @@ The various types of commits:
|
|||
- `docs`: a change to the website or other Markdown documents.
|
||||
- `refactor`: a change to code that doesn't change behaviour, e.g. splitting files, renaming internal variables, improving code style…
|
||||
- `chore`: upgrading dependencies, releasing new versions… Chores that are **regularly done** for maintenance purposes.
|
||||
- `misc`: anything else that doesn't change production code, yet is not `test` or `chore`. e.g. updating GitHub actions workflow.
|
||||
- `misc`: anything else that doesn't change production code, yet is not `chore`. e.g. updating GitHub actions workflow.
|
||||
|
||||
The commits within your PR don't need to follow this convention (we'll [squash them](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)). However, the PR title should be in this format. If you're not sure about the title, don't worry, we'll help you fix it. Your code is more important than conventions!
|
||||
|
||||
|
|
86
README.md
|
@ -11,16 +11,23 @@
|
|||
<a href="https://github.com/welpo/tabi/releases">
|
||||
<img src="https://img.shields.io/github/v/release/welpo/tabi?style=flat-square&labelColor=202b2d&color=087e96" alt="Latest release"></a>
|
||||
<a href="https://welpo.github.io/tabi/blog/mastering-tabi-settings/">
|
||||
<img src="https://img.shields.io/website?url=https%3A%2F%2Fwelpo.github.io%2Ftabi&style=flat-square&label=docs&labelColor=202b2d&color=087e96" alt="Documentation"></a>
|
||||
<img src="https://img.shields.io/website?url=https%3A%2F%2Fwelpo.github.io%2Ftabi&style=flat-square&label=docs&labelColor=202b2d" alt="Documentation"></a>
|
||||
<a href="https://github.com/welpo/tabi/blob/main/LICENSE">
|
||||
<img src="https://img.shields.io/github/license/welpo/tabi?style=flat-square&labelColor=202b2d&color=087e96" alt="License"></a>
|
||||
<a href="https://github.com/welpo/git-sumi">
|
||||
<img src="https://img.shields.io/badge/clean_commits-git--sumi-0?style=flat-square&labelColor=202b2d&color=087e96" alt="Clean commits"></a>
|
||||
<a href="https://isitmaintained.com/project/welpo/tabi">
|
||||
<img src="https://isitmaintained.com/badge/resolution/welpo/tabi.svg" alt="Average time to resolve an issue"></a>
|
||||
<a href="https://isitmaintained.com/project/welpo/tabi">
|
||||
<img src="https://isitmaintained.com/badge/open/welpo/tabi.svg" alt="Percentage of issues still open"></a>
|
||||
</p>
|
||||
|
||||
# tabi
|
||||
# 🌱 tabi
|
||||
|
||||
A fast, lightweight, and modern [Zola](https://www.getzola.org) theme with multi-language support. It aims to be a personal page and home to blog posts.
|
||||
An accessible [Zola](https://www.getzola.org) theme with [search](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search), [multi-language support](https://welpo.github.io/tabi/blog/faq-languages/), [optional JavaScript](https://welpo.github.io/tabi/blog/javascript/), a perfect Lighthouse score, and [comprehensive documentation](https://welpo.github.io/tabi). Crafted for personal websites and blogs.
|
||||
|
||||
> [!TIP]
|
||||
> Want to start blogging right away? Use the [tabi-start template](https://github.com/welpo/tabi-start) to get a complete site up and running in minutes.
|
||||
|
||||
See a live preview (and the theme's documentation) [here](https://welpo.github.io/tabi).
|
||||
|
||||
|
@ -38,6 +45,7 @@ tabi has a perfect score on Google's Lighthouse audit:
|
|||
|
||||
- [X] [Set any language as default](https://welpo.github.io/tabi/blog/faq-languages/#how-do-i-set-a-default-language-for-my-site). Set your base site to Chinese, Spanish, French, Hindi… or any [other supported language](/i18n). The theme's interface will be translated accordingly.
|
||||
- [X] [Integration with remote repositories](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#git-repository-integration) on GitHub, GitLab, Gitea & Codeberg for commit history and showing the site source.
|
||||
- [X] [Series support](https://welpo.github.io/tabi/blog/series/) for creating sequential content like tutorials, courses, and multi-part stories.
|
||||
- [X] Dark and light themes. Defaults to the OS setting, with a switcher in the navigation bar.
|
||||
- [X] Thorough documentation. See [Mastering tabi Settings: A Comprehensive Guide](https://welpo.github.io/tabi/blog/mastering-tabi-settings/).
|
||||
- [X] Perfect Lighthouse score (Performance, Accessibility, Best Practices and SEO).
|
||||
|
@ -64,11 +72,17 @@ tabi has a perfect score on Google's Lighthouse audit:
|
|||
- [X] Responsive design.
|
||||
- [X] [Projects page](https://welpo.github.io/tabi/projects/).
|
||||
- [X] [Archive page](https://welpo.github.io/tabi/archive/).
|
||||
- [X] [Pinned posts](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#pinning-posts).
|
||||
- [X] [Social links](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-icons).
|
||||
- [X] [Tags](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#tags).
|
||||
|
||||
## Installation
|
||||
|
||||
> [!NOTE]
|
||||
> The fastest way to create a new site is to use the [tabi-start template](https://github.com/welpo/tabi-start). This gives you a complete blog setup with all the essential configuration ready to go.
|
||||
|
||||
### Manual installation
|
||||
|
||||
To add tabi to you existing Zola site:
|
||||
|
||||
0. Initialize a Git repository in your project directory (if you haven't already):
|
||||
|
@ -111,24 +125,40 @@ highlight_code = true
|
|||
highlight_theme = "css"
|
||||
```
|
||||
|
||||
5. Create a `content/_index.md` file with the following content:
|
||||
5. Create a `content/_index.md` file. This file controls how your home page looks and behaves. Choose one of the following options:
|
||||
|
||||
```
|
||||
+++
|
||||
title = "Home"
|
||||
paginate_by = 5 # Set the number of posts per page
|
||||
template = "index.html"
|
||||
+++
|
||||
```
|
||||
**Option A: Serve posts from `/`**:
|
||||
|
||||
If you want to serve your blog posts from a different path, such as `blog/`, add a `section_path` in the `[extra]` section of `content/_index.md` (this file will need pagination):
|
||||
```
|
||||
+++
|
||||
title = "Home"
|
||||
paginate_by = 5 # Show 5 posts per page.
|
||||
+++
|
||||
```
|
||||
|
||||
```
|
||||
[extra]
|
||||
section_path = "blog/_index.md"
|
||||
```
|
||||
- This will display posts in `content/` with pagination.
|
||||
|
||||
**Note**: use the full path to the section's `_index.md` file. Simply using `section_path = "blog/"` will not work.
|
||||
**Option B: Serve posts from a different path (e.g., `blog/`)**:
|
||||
|
||||
```
|
||||
+++
|
||||
title = "Home"
|
||||
# Note we're not setting `paginate_by` here.
|
||||
|
||||
[extra]
|
||||
section_path = "blog/_index.md" # Where to find your posts.
|
||||
max_posts = 5 # Show 5 posts on the home page.
|
||||
+++
|
||||
```
|
||||
|
||||
- This will display the latest 5 posts from the `blog/` section.
|
||||
- Do not set `paginate_by` if you choose this option.
|
||||
- Use the full path to the section's `_index.md` file. Using `section_path = "blog/"` will not work.
|
||||
|
||||
> [!WARNING]
|
||||
> Do not set both `paginate_by` and `section_path` in `content/_index.md`.
|
||||
>
|
||||
> These settings are mutually exclusive and using both may result in no posts being displayed.
|
||||
|
||||
6. If you want an introduction section (see screenshot above), add these lines to `content/_index.md`:
|
||||
|
||||
|
@ -180,16 +210,30 @@ git pull
|
|||
| [mikufan.page](https://mikufan.page) | [Nadia](https://github.com/nyadiia) | Personal blog | [Source](https://github.com/nyadiia/mikufan.page) |
|
||||
| [tim-boettcher.online](https://tim-boettcher.online/) | [Tim Böttcher](https://codeberg.org/Tim-Boettcher/) | Insights and ramblings of a deafblind programmer | [Source](https://codeberg.org/Tim-Boettcher/tim-boettcher-online/) |
|
||||
| [www.richtman.au](https://www.richtman.au) | [Ariel Richtman](https://github.com/arichtman) | Personal tech blog | [Source](https://github.com/arichtman/www.richtman.au) |
|
||||
| [Ponderosa Games](https://ponderosagames.com/) | John Burak ([JVimes](https://github.com/jvimes)) | A friendly indie game company | — |
|
||||
| [jmbhughes.com](https://jmbhughes.com/) | Marcus Hughes ([jmbhughes](https://github.com/jmbhughes)) | Personal blog | [Source](https://github.com/jmbhughes/jmbhughes.github.io) |
|
||||
| [szabolcs.me](https://szabolcs.me) | Szabolcs Fazekas ([szabolcsf](https://github.com/szabolcsf)) | Personal blog | [Source](https://github.com/szabolcsf/szabolcs.me) |
|
||||
| [Nizzlay](https://nizzlay.com) | Niels Gouman ([Nizzlay](https://github.com/Nizzlay)) | Personal blog | [Source](https://github.com/Nizzlay/nizzlay.com) |
|
||||
| [ZzMzaw's blog](https://zzmzaw.github.io/) | ZzMzaw ([ZzMzaw](https://github.com/ZzMzaw)) | Personal blog | [Source](https://github.com/ZzMzaw/zzmzaw.github.io) |
|
||||
| [idle-ti.me](https://idle-ti.me/) | Jérôme Ramette ([be-next](https://github.com/be-next)) | Personal blog | [Source](https://github.com/be-next/idle-ti.me) |
|
||||
|
||||
Using tabi? Feel free to create a PR and add your site to this list.
|
||||
|
||||
## Inspiration
|
||||
|
||||
This theme was inspired by:
|
||||
- [shadharon](https://github.com/syedzayyan/shadharon) — tabi started as a fork of [syedzayyan](https://github.com/syedzayyan)'s theme;
|
||||
- [tailwind-nextjs-starter-blog](https://github.com/timlrx/tailwind-nextjs-starter-blog);
|
||||
- [abridge](https://github.com/Jieiku/abridge);
|
||||
- [internetVin's blog](https://internetvin.ghost.io).
|
||||
|
||||
- [shadharon](https://github.com/syedzayyan/shadharon) — tabi started as a fork of [syedzayyan](https://github.com/syedzayyan)'s theme
|
||||
- [tailwind-nextjs-starter-blog](https://github.com/timlrx/tailwind-nextjs-starter-blog)
|
||||
- [abridge](https://github.com/Jieiku/abridge)
|
||||
|
||||
## Support
|
||||
|
||||
Something not working? Have an idea? Let us know!
|
||||
|
||||
- Questions? → [Start a discussion](https://github.com/welpo/tabi/discussions)
|
||||
- Found a bug? → [Report it here](https://github.com/welpo/tabi/issues/new?&labels=bug&template=2_bug_report.yml)
|
||||
- Feature request? → [Tell us more!](https://github.com/welpo/tabi/issues/new?&labels=feature&template=3_feature_request.yml)
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ body = """
|
|||
{% macro commit(commit, in_breaking_section=false) -%}
|
||||
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}{% if commit.breaking and not in_breaking_section %}[**‼️BREAKING‼️**] {% endif %}\
|
||||
{{ commit.message | upper_first }}\
|
||||
{% if not commit.github.pr_number %} ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }})){%- endif -%}{% if commit.github.username %} by @{{ commit.github.username }} \
|
||||
{% if not commit.remote.pr_number %} ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }})){%- endif -%}{% if commit.remote.username %} by @{{ commit.remote.username }} \
|
||||
{%- set co_authors = commit.footers | filter(attribute="token", value="Co-authored-by") | map(attribute="value") -%}
|
||||
{%- set number_of_co_authors = co_authors | length -%}
|
||||
{%- for co_author in co_authors -%}
|
||||
|
|
60
config.toml
|
@ -1,14 +1,14 @@
|
|||
base_url = "https://welpo.github.io/tabi"
|
||||
title = "~/tabi"
|
||||
description = "tabi is a fast, lightweight, and modern Zola theme with multi-language support, optional JavaScript, and a perfect Lighthouse score."
|
||||
description = "tabi is an accessible Zola theme with search, multi-language support, optional JavaScript, a perfect Lighthouse score, and comprehensive documentation. Crafted for personal websites and blogs."
|
||||
author = "welpo"
|
||||
generate_feeds = true
|
||||
compile_sass = true
|
||||
minify_html = true
|
||||
build_search_index = true
|
||||
|
||||
# To translate the entire theme, there must be a file with the same ISO 639-1
|
||||
# (or IETF BCP 47) Code in the `i18n` folder of your site or the tabi theme
|
||||
# To translate the entire theme, there must be a file with the same language code
|
||||
# in the `i18n` folder of your site or the tabi theme.
|
||||
# For example, "i18n/fr.toml" for French or "i18n/zh-Hans.toml" for Simplified Chinese.
|
||||
# Otherwise the theme will be in English.
|
||||
# See https://welpo.github.io/tabi/blog/faq-languages/ for more details.
|
||||
|
@ -38,6 +38,8 @@ bottom_footnotes = true
|
|||
# To use a Zola built-in theme, CSP needs to allow unsafe-inline for style-src.
|
||||
highlight_theme = "css"
|
||||
smart_punctuation = true
|
||||
# Set to 'external' to add an indicator next to external links.
|
||||
external_links_class = "external"
|
||||
|
||||
[link_checker]
|
||||
internal_level = "warn"
|
||||
|
@ -50,14 +52,14 @@ skip_anchor_prefixes = [
|
|||
|
||||
[languages.es]
|
||||
title = "~/tabi"
|
||||
description = "tabi es un tema de Zola rápido, liviano y moderno con JavaScript opcional y una puntuación perfecta en Lighthouse."
|
||||
description = "tabi es un tema accesible para Zola con búsqueda, soporte multilingüe, JavaScript opcional, una puntuación perfecta en Lighthouse y documentación exhaustiva. Diseñado para sitios web y blogs personales."
|
||||
generate_feeds = true
|
||||
taxonomies = [{name = "tags", feed = true}]
|
||||
build_search_index = true
|
||||
|
||||
[languages.ca]
|
||||
title = "~/tabi"
|
||||
description = "tabi és un tema de Zola ràpid, lleuger i modern amb JavaScript opcional i una puntuació perfecta a Lighthouse."
|
||||
description = "tabi és un tema accessible per a Zola amb cerca, suport multilingüe, JavaScript opcional, una puntuació perfecta a Lighthouse i documentació exhaustiva. Dissenyat per a llocs web i blogs personals."
|
||||
generate_feeds = true
|
||||
taxonomies = [{name = "tags", feed = true}]
|
||||
|
||||
|
@ -133,13 +135,18 @@ show_remote_changes = true # Defaults to true.
|
|||
# Show a link to the repository of the site, right next to the "Powered by Zola & tabi" text.
|
||||
show_remote_source = true # Defaults to true.
|
||||
|
||||
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
|
||||
# Add a "copy" button to code blocks (loads ~700 bytes of JavaScript).
|
||||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||
copy_button = true
|
||||
|
||||
# Loads the necessary JavaScript (~400 bytes) to use the "Show source or path" shortcode: https://welpo.github.io/tabi/blog/shortcodes/#show-source-or-path
|
||||
# Make code block names clickable if they are URLs (loads ~400 bytes of JavaScript).
|
||||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||
add_src_to_code_block = false
|
||||
code_block_name_links = false
|
||||
|
||||
# Force left-to-right (LTR) direction for code blocks.
|
||||
# Set to false to allow code to follow the document's natural direction.
|
||||
# Can be set at page or section levels. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||
force_codeblock_ltr = true
|
||||
|
||||
# Show the author(s) of a page.
|
||||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||
|
@ -159,6 +166,16 @@ show_date = true
|
|||
# "both" - Show both the original date and the last updated date.
|
||||
post_listing_date = "date"
|
||||
|
||||
# Show "Jump to posts" link next to series' title.
|
||||
# By default, the link appears automatically when a series description exceeds 2000 characters.
|
||||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||
# show_jump_to_posts = true
|
||||
|
||||
# Determines if indexes should be increasing (false) or decreasing (true) in series' posts list.
|
||||
# It has only effect if the section uses indexes metadata (which is only the case for series as of now).
|
||||
# Can be set at section levels, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||
post_listing_index_reversed = false # Defaults to false.
|
||||
|
||||
# DEPRECATED!
|
||||
# Use Zola's built-in `bottom_footnotes = true` in the [markdown] section instead. (Available since v0.19.0)
|
||||
# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts).
|
||||
|
@ -223,6 +240,12 @@ compact_tags = false
|
|||
# Default: "name".
|
||||
tag_sorting = "name"
|
||||
|
||||
# Show clickable tags above cards.html template (e.g. projects/) to filter the displayed items.
|
||||
# Loads JS to filter. If JS is disabled, the buttons are links to the tag's page.
|
||||
# Can be set at the section or config.toml level, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||
# Default: true
|
||||
enable_cards_tag_filtering = true
|
||||
|
||||
# Invert the order of the site title and page title in the browser tab.
|
||||
# Example: true => "Blog • ~/tabi", false => "~/tabi • Blog"
|
||||
invert_title_order = false
|
||||
|
@ -238,7 +261,7 @@ favicon_emoji = "🌱"
|
|||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||
# Learn how to create these images in batch and automatically:
|
||||
# https://osc.garden/blog/automating-social-media-cards-zola/
|
||||
social_media_card = "social_cards/index.jpg"
|
||||
social_media_card = "index.jpg"
|
||||
|
||||
menu = [
|
||||
{ name = "blog", url = "blog", trailing_slash = true },
|
||||
|
@ -274,6 +297,11 @@ socials = [
|
|||
{ name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" },
|
||||
]
|
||||
|
||||
# Fediverse profile.
|
||||
# Adds metadata to feature the author's profile in Mastodon link previews.
|
||||
# Example: for @username@example.com, use:
|
||||
# fediverse_creator = { handle = "username", domain = "example.com" }
|
||||
|
||||
# Extra menu to show on the footer, below socials section.
|
||||
footer_menu = [
|
||||
{url = "about", name = "about", trailing_slash = true},
|
||||
|
@ -315,10 +343,14 @@ allowed_domains = [
|
|||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||
enable_csp = true
|
||||
|
||||
# Custom subset of characters for the header.
|
||||
# If set to true, the `static/custom_subset.css` file will be loaded first.
|
||||
# This avoids a flashing text issue in Firefox.
|
||||
# Please see https://welpo.github.io/tabi/blog/custom-font-subset/ to learn how to create this file.
|
||||
# Font subsetting configuration.
|
||||
# This feature helps prevent text flashing in Firefox when using custom fonts.
|
||||
# See: https://welpo.github.io/tabi/blog/custom-font-subset/
|
||||
# Enable or disable font subsetting completely, both built-in and custom subsets.
|
||||
enable_subset = true
|
||||
# Use a custom subset of characters for the header.
|
||||
# If true, tabi will load the `static/custom_subset.css` file.
|
||||
# If false, tabi will use the default language-specific subset (English or Spanish).
|
||||
custom_subset = true
|
||||
|
||||
[extra.analytics]
|
||||
|
@ -330,7 +362,7 @@ service = "goatcounter"
|
|||
# For GoatCounter, this is the code you choose during signup.
|
||||
# For Umami, this is the website ID.
|
||||
# For Plausible, this is the domain name (e.g. "example.com").
|
||||
# Note: Leave this field empty if you're self-hosting.
|
||||
# Note: Leave this field empty if you're self-hosting GoatCounter.
|
||||
# id = "yourID"
|
||||
|
||||
# Optional: Specify the URL for self-hosted analytics instances.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
+++
|
||||
title = "Publicacions recents"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
|
||||
[extra]
|
||||
header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, l'autor de tabi" }
|
||||
|
@ -10,7 +9,7 @@ max_posts = 4
|
|||
projects_path = "projects/_index.ca.md"
|
||||
max_projects = 3
|
||||
show_projects_first = false
|
||||
social_media_card = "social_cards/ca.jpg"
|
||||
social_media_card = "ca.jpg"
|
||||
+++
|
||||
|
||||
tabi és un tema de [Zola](https://www.getzola.org) ràpid, lleuger i modern. Té com a objectiu ser una pàgina personal i llar d'entrades de blog. Compta amb una puntuació perfecta de Lighthouse, disseny responsive, tema fosc i clar, shortcodes personalitzats i molt més.
|
||||
tabi és un tema accessible per a Zola amb [cerca](@/blog/mastering-tabi-settings/index.ca.md#cerca), [suport multilingüe](@/blog/faq-languages/index.ca.md), [JavaScript opcional](@/blog/javascript/index.ca.md), una puntuació perfecta a Lighthouse i documentació exhaustiva. Dissenyat per a llocs web i blogs personals.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
+++
|
||||
title = "Publicaciones recientes"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
|
||||
[extra]
|
||||
header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, el autor de tabi" }
|
||||
|
@ -10,7 +9,7 @@ max_posts = 4
|
|||
projects_path = "projects/_index.es.md"
|
||||
max_projects = 3
|
||||
show_projects_first = false
|
||||
social_media_card = "social_cards/es.jpg"
|
||||
social_media_card = "es.jpg"
|
||||
+++
|
||||
|
||||
tabi es un tema de [Zola](https://www.getzola.org) rápido, ligero y moderno. Su objetivo es ser una página personal y hogar para publicaciones de blogs. Cuenta con una puntuación perfecta en Lighthouse, diseño responsive, tema oscuro y claro, shortcodes personalizados y mucho más.
|
||||
tabi es un tema accesible para [Zola](https://www.getzola.org) con [búsqueda](@/blog/mastering-tabi-settings/index.es.md#busqueda), [soporte multilingüe](@/blog/faq-languages/index.es.md), [JavaScript opcional](@/blog/javascript/index.es.md), una puntuación perfecta en Lighthouse y documentación exhaustiva. Diseñado para sitios web y blogs personales.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
+++
|
||||
title = "Latest posts"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
|
||||
[extra]
|
||||
header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, the theme's author" }
|
||||
|
@ -10,7 +9,7 @@ max_posts = 4
|
|||
projects_path = "projects/_index.md"
|
||||
max_projects = 3
|
||||
show_projects_first = false
|
||||
social_media_card = "social_cards/index.jpg"
|
||||
social_media_card = "index.jpg"
|
||||
+++
|
||||
|
||||
tabi is a fast, lightweight, and modern [Zola](https://www.getzola.org) theme. It aims to be a personal page and home to blog posts. It features a perfect Lighthouse score, responsive design, dark and light themes, custom shortcodes, and much more.
|
||||
tabi is an accessible [Zola](https://www.getzola.org) theme with [search](@/blog/mastering-tabi-settings/index.md#search), [multi-language support](@/blog/faq-languages/index.md), [optional JavaScript](@/blog/javascript/index.md), a perfect Lighthouse score, and comprehensive documentation. Crafted for personal websites and blogs.
|
||||
|
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
@ -3,5 +3,5 @@ title = "Arxiu"
|
|||
template = "archive.html"
|
||||
|
||||
[extra]
|
||||
social_media_card = "archive/social_cards/ca_archive.jpg"
|
||||
social_media_card = "ca_archive.jpg"
|
||||
+++
|
||||
|
|
|
@ -3,5 +3,5 @@ title = "Archivo"
|
|||
template = "archive.html"
|
||||
|
||||
[extra]
|
||||
social_media_card = "archive/social_cards/es_archive.jpg"
|
||||
social_media_card = "es_archive.jpg"
|
||||
+++
|
||||
|
|
|
@ -3,5 +3,5 @@ title = "Archive"
|
|||
template = "archive.html"
|
||||
|
||||
[extra]
|
||||
social_media_card = "archive/social_cards/archive.jpg"
|
||||
social_media_card = "archive.jpg"
|
||||
+++
|
||||
|
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
@ -2,10 +2,9 @@
|
|||
paginate_by = 5
|
||||
title = "Blog"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
insert_anchor_links = "left"
|
||||
|
||||
[extra]
|
||||
social_media_card = "blog/social_cards/ca_blog.jpg"
|
||||
social_media_card = "ca_blog.jpg"
|
||||
show_previous_next_article_links = true
|
||||
+++
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
paginate_by = 5
|
||||
title = "Blog"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
insert_anchor_links = "left"
|
||||
|
||||
[extra]
|
||||
social_media_card = "blog/social_cards/es_blog.jpg"
|
||||
social_media_card = "es_blog.jpg"
|
||||
show_previous_next_article_links = true
|
||||
+++
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
paginate_by = 5
|
||||
title = "Blog"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
insert_anchor_links = "left"
|
||||
|
||||
[extra]
|
||||
social_media_card = "blog/social_cards/blog.jpg"
|
||||
social_media_card = "blog.jpg"
|
||||
show_previous_next_article_links = true
|
||||
+++
|
||||
|
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Optimitza la càrrega amb un subconjunt de font personalitzat"
|
||||
date = 2023-04-29
|
||||
updated = 2023-07-08
|
||||
updated = 2025-01-12
|
||||
description = "Aprèn com crear un subconjunt personalitzat que només inclogui els glifs necessaris."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -21,7 +21,11 @@ Per solucionar això, tabi carrega un subconjunt de glifs per a l'encapçalament
|
|||
|
||||
Per defecte, tabi inclou fitxers de subconjunts per a caràcters en anglès i espanyol (amb alguns símbols). Aquests fitxers es carreguen quan la pàgina o el lloc web de Zola està en aquest idioma.
|
||||
|
||||
Per a una optimització addicional, pots crear un subconjunt de fonts personalitzat que només inclogui els caràcters utilitzats en el teu encapçalament.
|
||||
{% admonition(type="tip") %}
|
||||
Si estàs fent servir una font personalitzada, pots crear el teu propi subconjunt (segueix llegint) o desactivar completament els subconjunts predeterminats amb `enable_subset = false` a `config.toml`.
|
||||
{% end %}
|
||||
|
||||
Per a una optimització addicional, a continuació t'expliquem com crear un subconjunt de fonts personalitzat que només inclogui els caràcters utilitzats en el teu encapçalament.
|
||||
|
||||
## Requisits
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Optimiza la carga con un subconjunto de fuente personalizado"
|
||||
date = 2023-04-29
|
||||
updated = 2023-07-08
|
||||
updated = 2025-01-12
|
||||
description = "Aprende cómo crear un subconjunto personalizado que solo incluya los glifos necesarios."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -21,7 +21,11 @@ Para solucionar esto, tabi carga un subconjunto de glifos para el encabezado. Da
|
|||
|
||||
Por defecto, tabi incluye archivos de subconjuntos para caracteres en inglés y español (con algunos símbolos). Estos archivos se cargan cuando la página o el sitio de Zola está en ese idioma.
|
||||
|
||||
Para una optimización adicional, puedes crear un subconjunto de fuentes personalizado que solo incluya los caracteres utilizados en tu encabezado.
|
||||
{% admonition(type="tip") %}
|
||||
Si estás usando una fuente personalizada, puedes crear tu propio subconjunto (ver más abajo) o desactivar completamente los subconjuntos predeterminados con `enable_subset = false` en tu `config.toml`.
|
||||
{% end %}
|
||||
|
||||
Para una optimización adicional, a continuación verás cómo crear un subconjunto de fuentes personalizado que solo incluya los caracteres utilizados en tu encabezado.
|
||||
|
||||
## Requisitos
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Optimise loading times with a custom font subset"
|
||||
date = 2023-04-29
|
||||
updated = 2023-07-08
|
||||
updated = 2025-01-12
|
||||
description = "Learn how to create a custom subset that only includes the necessary glyphs."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -21,7 +21,11 @@ To fix this, tabi loads a subset of glyphs for the header. Since this (slightly)
|
|||
|
||||
By default, there are subset files for English and Spanish characters (with a few symbols). These files are loaded when the Zola page/site is set to that language.
|
||||
|
||||
For further optimisation, you can create a custom font subset that only includes the characters used in your header.
|
||||
{% admonition(type="tip") %}
|
||||
If you're using a custom font, either create your custom subset (see below) or disable the built-in subsets completely with `enable_subset = false` in your `config.toml`.
|
||||
{% end %}
|
||||
|
||||
Here's how you can create a custom font subset that only includes the characters used in your header, for maximum efficiency.
|
||||
|
||||
## Requirements
|
||||
|
||||
|
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Sense JavaScript obligatori"
|
||||
date = 2023-01-06
|
||||
updated = 2024-08-28
|
||||
updated = 2025-02-15
|
||||
description = "JavaScript només s'utilitza quan HTML i CSS no són suficients."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -25,10 +25,11 @@ Aquest tema no requereix JavaScript obligatori. Opcionalment, pot carregar una q
|
|||
|
||||
Les següents opcions es poden especificar per a publicacions, seccions i globalment, seguint la jerarquia de `pàgina > secció > config.toml`:
|
||||
|
||||
- [**Suport de KaTeX**](@/blog/markdown/index.ca.md#katex). Habilitat configurant `katex = true` (274 KB).
|
||||
- [**Suport de KaTeX**](@/blog/markdown/index.ca.md#katex). Habilitat configurant `katex = true` (274 KB). Per renderitzar fórmules sense JS, prova [MathML](https://developer.mozilla.org/docs/Web/MathML/).
|
||||
- [**Diagrames de Mermaid**](@/blog/shortcodes/index.ca.md#diagrames-de-mermaid). Habilitat configurant `mermaid = true` (~2.5 MB).
|
||||
- [**Còpia de blocs de codi amb un sol clic**](@/blog/markdown/index.ca.md#bloc-de-codi). Habilitada configurant `copy_button = true`. (~700 bytes)
|
||||
- [**Mostrar ruta/URL a blocs de codi**](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url). S'activa configurant `add_src_to_code_block = true`. (~400 bytes)
|
||||
- [**Noms de blocs de codi clicables**](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url). S'activa configurant `code_block_name_links = true`. (~400 bytes)
|
||||
- [**Filtratge per etiquetes** per a graelles de targetes](@/blog/mastering-tabi-settings/index.ca.md#filtrar-projectes) (p. ex. [projectes](@/projects/_index.ca.md)) (~2KB). S'habilita configurant `enable_cards_tag_filtering = true`.
|
||||
|
||||
Per especificar aquestes opcions:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Sin JavaScript obligatorio"
|
||||
date = 2023-01-06
|
||||
updated = 2024-08-28
|
||||
updated = 2025-02-15
|
||||
description = "JavaScript solo se utiliza cuando HTML y CSS no son suficientes."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -25,10 +25,11 @@ Este tema no requiere JavaScript de manera obligatoria. Opcionalmente, puede car
|
|||
|
||||
Las siguientes opciones pueden especificarse para publicaciones, secciones y a nivel global, siguiendo la jerarquía de `página > sección > config.toml`:
|
||||
|
||||
- [**Soporte de KaTeX**](@/blog/markdown/index.es.md#katex). Habilitado al configurar `katex = true` (274 KB).
|
||||
- [**Soporte de KaTeX**](@/blog/markdown/index.es.md#katex). Habilitado al configurar `katex = true` (274 KB). Para renderizar fórmulas sin JS, prueba [MathML](https://developer.mozilla.org/docs/Web/MathML/).
|
||||
- [**Diagramas de Mermaid**](@/blog/shortcodes/index.es.md#diagramas-de-mermaid). Habilitado al configurar `mermaid = true` (~2.5 MB).
|
||||
- [**Copia de bloques de código con un solo clic**](@/blog/markdown/index.es.md#bloque-de-codigo). Habilitado al configurar `copy_button = true` (~700 bytes).
|
||||
- [**Mostrar ruta/URL en bloques de código**](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url). Se activa configurando `add_src_to_code_block = true`. (~400 bytes)
|
||||
- [**Nombres de bloques de código clicables**](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url). Se activa configurando `code_block_name_links = true`. (~400 bytes)
|
||||
- [**Filtraje por etiquetas** para cuadrículas de tarjetas](@/blog/mastering-tabi-settings/index.es.md#filtrar-proyectos) (p. ej. [proyectos](@/projects/_index.es.md)) (~2KB). Habilitado al configurar `enable_cards_tag_filtering = true`.
|
||||
|
||||
Para especificar estas opciones:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "No mandatory JavaScript"
|
||||
date = 2023-01-06
|
||||
updated = 2024-08-28
|
||||
updated = 2025-02-15
|
||||
description = "JavaScript is only used when HTML and CSS aren't enough."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -25,10 +25,11 @@ This theme has no mandatory JavaScript. Optionally, it can load a minimal amount
|
|||
|
||||
The following settings can be specified for posts, sections and globally, following the hierarchy of `page > section > config.toml`:
|
||||
|
||||
- [**KaTeX support**](@/blog/markdown/index.md#katex). Enabled by setting `katex = true` (274 KB).
|
||||
- [**KaTeX support**](@/blog/markdown/index.md#katex). Enabled by setting `katex = true` (274 KB). To render math without JS, check out [MathML](https://developer.mozilla.org/docs/Web/MathML/).
|
||||
- [**Mermaid diagrams**](@/blog/shortcodes/index.md#mermaid-diagrams). Enabled by setting `mermaid = true` (~2.5 MB).
|
||||
- [**One-click copy of code blocks**](@/blog/markdown/index.md#code-block). Enabled by setting `copy_button = true`. (~700 bytes)
|
||||
- [**Showing source (path or URL) in code blocks**](@/blog/shortcodes/index.md#show-source-or-path). Enabled by setting `add_src_to_code_block = true`. (~300 bytes)
|
||||
- [**Clickable code block names**](@/blog/shortcodes/index.md#show-source-or-path). Enabled by setting `code_block_name_links = true`. (~300 bytes)
|
||||
- [**Tag filtering** for card grids](@/blog/mastering-tabi-settings/index.md#filtering-projects) (e.g. [projects](@/projects/_index.md)) (~2KB). Enabled by setting `enable_cards_tag_filtering = true`.
|
||||
|
||||
To specify these settings:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Exemples de Markdown"
|
||||
date = 2023-01-31
|
||||
updated = 2023-09-01
|
||||
updated = 2024-11-23
|
||||
description = "Aquesta publicació mostra alguns exemples de format en Markdown, incloent-hi una taula, blocs de codi i etiquetes, citacions, taules i notes a peu de pàgina."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -59,6 +59,42 @@ fn main() {
|
|||
}
|
||||
```
|
||||
|
||||
### Amb numeració de línies
|
||||
|
||||
```rust,linenos
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct TwinPeaksCharacter {
|
||||
name: String,
|
||||
coffee_rating: f32,
|
||||
pie_preference: String,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut black_lodge = HashMap::new();
|
||||
|
||||
black_lodge.insert("agent", TwinPeaksCharacter {
|
||||
name: String::from("Dale Cooper"),
|
||||
coffee_rating: 9999.99,
|
||||
pie_preference: String::from("Damn Fine Cherry"),
|
||||
});
|
||||
|
||||
black_lodge.insert("giant", TwinPeaksCharacter {
|
||||
name: String::from("The Fireman"),
|
||||
coffee_rating: 42.424242,
|
||||
pie_preference: String::from("Garmonbozia"),
|
||||
});
|
||||
|
||||
// Calculate total appreciation of damn fine coffee
|
||||
let total_coffee: f32 = black_lodge.values()
|
||||
.map(|character| character.coffee_rating)
|
||||
.sum();
|
||||
|
||||
println!("☕ Total coffee appreciation: {:.2} cups", total_coffee);
|
||||
}
|
||||
```
|
||||
|
||||
## Etiquetes de codi
|
||||
|
||||
A Rust, declares una variable mutable amb `let mut x = 5;`, mentre que a Python, simplement fas `x = 5`. De manera similar, per imprimir un valor a Rust, utilitzaries `println!("Valor: {}", x);`, però a Python, és tan senzill com `print(f"Valor: {x}")`.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Ejemplos de Markdown"
|
||||
date = 2023-01-31
|
||||
updated = 2023-09-01
|
||||
updated = 2024-11-23
|
||||
description = "Esta publicación muestra algunos ejemplos de formato Markdown, incluyendo una tabla, bloques de código y etiquetas, citas, tablas y notas al pie de página."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -59,6 +59,42 @@ fn main() {
|
|||
}
|
||||
```
|
||||
|
||||
### Con números de línea
|
||||
|
||||
```rust,linenos
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct TwinPeaksCharacter {
|
||||
name: String,
|
||||
coffee_rating: f32,
|
||||
pie_preference: String,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut black_lodge = HashMap::new();
|
||||
|
||||
black_lodge.insert("agent", TwinPeaksCharacter {
|
||||
name: String::from("Dale Cooper"),
|
||||
coffee_rating: 9999.99,
|
||||
pie_preference: String::from("Damn Fine Cherry"),
|
||||
});
|
||||
|
||||
black_lodge.insert("giant", TwinPeaksCharacter {
|
||||
name: String::from("The Fireman"),
|
||||
coffee_rating: 42.424242,
|
||||
pie_preference: String::from("Garmonbozia"),
|
||||
});
|
||||
|
||||
// Calculate total appreciation of damn fine coffee
|
||||
let total_coffee: f32 = black_lodge.values()
|
||||
.map(|character| character.coffee_rating)
|
||||
.sum();
|
||||
|
||||
println!("☕ Total coffee appreciation: {:.2} cups", total_coffee);
|
||||
}
|
||||
```
|
||||
|
||||
## Etiquetas de código
|
||||
|
||||
En Rust, declaras una variable mutable con `let mut x = 5;`, mientras que en Python, simplemente usas `x = 5`. De manera similar, para imprimir un valor en Rust, utilizarías `println!("Valor: {}", x);`, pero en Python, es tan sencillo como `print(f"Valor: {x}")`.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Markdown examples"
|
||||
date = 2023-01-31
|
||||
updated = 2023-09-01
|
||||
updated = 2024-11-23
|
||||
description = "This post showcases some examples of Markdown formatting, including a table, code blocks and tags, quotes, tables, and footnotes."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -59,6 +59,42 @@ fn main() {
|
|||
}
|
||||
```
|
||||
|
||||
### With line numbers
|
||||
|
||||
```rust,linenos
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct TwinPeaksCharacter {
|
||||
name: String,
|
||||
coffee_rating: f32,
|
||||
pie_preference: String,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut black_lodge = HashMap::new();
|
||||
|
||||
black_lodge.insert("agent", TwinPeaksCharacter {
|
||||
name: String::from("Dale Cooper"),
|
||||
coffee_rating: 9999.99,
|
||||
pie_preference: String::from("Damn Fine Cherry"),
|
||||
});
|
||||
|
||||
black_lodge.insert("giant", TwinPeaksCharacter {
|
||||
name: String::from("The Fireman"),
|
||||
coffee_rating: 42.424242,
|
||||
pie_preference: String::from("Garmonbozia"),
|
||||
});
|
||||
|
||||
// Calculate total appreciation of damn fine coffee
|
||||
let total_coffee: f32 = black_lodge.values()
|
||||
.map(|character| character.coffee_rating)
|
||||
.sum();
|
||||
|
||||
println!("☕ Total coffee appreciation: {:.2} cups", total_coffee);
|
||||
}
|
||||
```
|
||||
|
||||
## Code tags
|
||||
|
||||
In Rust, you declare a mutable variable with `let mut x = 5;`, whereas in Python, you simply use `x = 5`. Similarly, to print a value in Rust, you would use `println!("Value: {}", x);`, but in Python, it's as straightforward as `print(f"Value: {x}")`.
|
||||
|
|
BIN
content/blog/mastering-tabi-settings/img/external_link_dark.webp
Normal file
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 9.3 KiB |
BIN
content/blog/mastering-tabi-settings/img/pinned_post_dark.webp
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
content/blog/mastering-tabi-settings/img/pinned_post_light.webp
Normal file
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 72 KiB |
|
@ -1,13 +1,14 @@
|
|||
+++
|
||||
title = "Domina la configuració de tabi: guia completa"
|
||||
date = 2023-09-18
|
||||
updated = 2024-09-17
|
||||
updated = 2025-02-16
|
||||
description = "Descobreix les múltiples maneres en què pots personalitzar tabi."
|
||||
|
||||
[taxonomies]
|
||||
tags = ["funcionalitat", "tutorial", "preguntes freqüents"]
|
||||
|
||||
[extra]
|
||||
pinned = true
|
||||
quick_navigation_buttons = true
|
||||
social_media_card = "social_cards/ca_blog_mastering_tabi_settings.jpg"
|
||||
+++
|
||||
|
@ -110,46 +111,77 @@ header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "Óscar Fe
|
|||
|
||||
La descripció és contingut Markdown normal, escrit fora del front matter.
|
||||
|
||||
#### Mostrant publicacions recents
|
||||
#### Llistant publicacions recents
|
||||
|
||||
Si vols mostrar publicacions a la pàgina principal, primer necessites decidir si la seva ruta serà `/` o quelcom diferent, com ara `/blog/`.
|
||||
Per mostrar publicacions a la pàgina principal, primer has de decidir d'on es serviran: de la ruta arrel (`/`) o d'un subdirectori (per exemple, `/blog`).
|
||||
|
||||
Si vols servir les publicacions des de `/`, necessites configurar `paginate_by = 5` al front matter del teu arxiu `_index.md`. **Nota**: això no es configura a l'apartat `[extra]`, sinó al front matter principal. Exemple:
|
||||
**Opció A: Servir publicacions des de la ruta arrel (`/`)**
|
||||
|
||||
Configura `paginate_by` al front matter del teu arxiu `content/_index.md`:
|
||||
|
||||
```toml
|
||||
title = "Últimes publicacions"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
paginate_by = 5
|
||||
paginate_by = 5 # Mostra 5 publicacions per pàgina.
|
||||
|
||||
[extra]
|
||||
header = {title = "Hola! Sóc tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, l'autor del tema" }
|
||||
header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "El teu nom" }
|
||||
```
|
||||
|
||||
Si prefereixes servir les publicacions des de `/blog`, pots configurar `section_path = "/blog"` a la secció `[extra]`. Aquesta és la configuració d'aquesta demo:
|
||||
{{ admonition(type="note", text="La configuració `paginate_by` va al front matter principal, no a la secció `[extra]`.") }}
|
||||
|
||||
**Opció B: Servir publicacions des d'un subdirectori (per exemple, `/blog`)**
|
||||
|
||||
Utilitza `section_path` a la secció `[extra]` del teu arxiu `content/_index.md`:
|
||||
|
||||
```toml
|
||||
title = "Publicacions recents"
|
||||
title = "Últimes publicacions"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
# No configuris `paginate_by` aquí.
|
||||
|
||||
[extra]
|
||||
header = {title = "Hola! Sóc tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, l'autor del tema" }
|
||||
section_path = "blog/_index.es.md"
|
||||
max_posts = 4
|
||||
header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "El teu nom" }
|
||||
section_path = "blog/_index.md" # On trobar les teves publicacions.
|
||||
max_posts = 5 # Mostra fins a 5 publicacions a la pàgina principal.
|
||||
```
|
||||
|
||||
Fixa't que si configures `section_path`, no cal que configuris `paginate_by`. Pots establir `max_posts` per determinar el nombre de publicacions que vols mostrar a la pàgina principal.
|
||||
{{ admonition(type="warning", title="ALERTA", text="No configuris `paginate_by` i `section_path` alhora. Aquestes configuracions són mútuament excloents i usar ambdues pot fer que no es mostrin publicacions.") }}
|
||||
|
||||
El `title` és el títol que apareix a sobre de les publicacions.
|
||||
Notes addicionals:
|
||||
|
||||
- El `title` al front matter estableix el títol que apareix sobre les publicacions.
|
||||
- Utilitza la ruta completa a l'arxiu `_index.md` de la secció per a `section_path`. Usar `section_path = "blog/"` no funcionarà.
|
||||
|
||||
##### Fixar entrades
|
||||
|
||||
Pots fixar entrades per mantenir-les a la part superior de la pàgina principal. En aquesta demo, aquesta entrada està fixada, així que apareix primera amb una icona i etiqueta de "fixada":
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/pinned_post_light.webp", dark_src="blog/mastering-tabi-settings/img/pinned_post_dark.webp", alt="Entrada fixada", full_width=true) }}
|
||||
|
||||
Les entrades fixades es mostren primer, mantenint el seu ordre relatiu segons el `sort_by` de la secció, seguides per les entrades regulars.
|
||||
|
||||
Per fixar una entrada, afegeix el següent al seu front matter:
|
||||
|
||||
```toml
|
||||
[extra]
|
||||
pinned = true
|
||||
```
|
||||
|
||||
{{ admonition(type="info", text="Aquesta configuració només afecta les pàgines principals del lloc (com `/`, `/es/`, `/fr/`). Altres seccions com `blog/`, `tags/` o `archive/` mostren les publicacions en el seu ordre habitual.") }}
|
||||
|
||||
{{ admonition(type="warning", text='Quan s'utilitza la paginació (`paginate_by`), les entrades fixades poden aparèixer dues vegades: una vegada a la part superior de la primera pàgina, i una altra en la seva posició cronològica normal en pàgines posteriors.') }}
|
||||
|
||||
##### Mostrar la data dels articles al llistat
|
||||
|
||||
Per defecte, quan es llisten els articles, es mostra la data de creació. Pots configurar quina(es) data(es) mostrar utilitzant l'opció `post_listing_date`. Configuracions disponibles:
|
||||
|
||||
- `date`: Mostra només la data de publicació original de l'article (opció per defecte).
|
||||
- `updated`: Mostra només la data de l'última actualització de l'article. Si no hi ha data d'actualització, es mostra la data de publicació original.
|
||||
- `both`: Mostra tant la data de publicació original com la data de l'última actualització.
|
||||
|
||||
{% admonition(type="tip") %}
|
||||
Aquesta configuració segueix la jerarquia: pots establir un valor global a `config.toml` o canviar-lo per a seccions específiques al seu arxiu `_index.md`. En ambdós casos, afegeix-lo a la secció `[extra]`.
|
||||
{% end %}
|
||||
|
||||
#### Llistat de Projectes
|
||||
|
||||
Pots mostrar una selecció de projectes a la teva pàgina principal. Per fer això, primer necessitaràs configurar el directori `projects`.
|
||||
|
@ -205,6 +237,25 @@ Fes clic a la imatge a continuació per comparar les fonts:
|
|||
|
||||
{{ image_toggler(default_src="blog/mastering-tabi-settings/img/serif.webp", toggled_src="blog/mastering-tabi-settings/img/sans-serif.webp", default_alt="Font serif", toggled_alt="Font sans-serif", full_width=true) }}
|
||||
|
||||
### Indicador d'enllaços externs
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix Jerarquia | Requereix JavaScript |
|
||||
|:------:|:------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
{{ admonition(type="info", text="Requereix Zola 0.20.0 o posterior.") }}
|
||||
|
||||
Si vols afegir una icona als enllaços externs, configura la secció `[markdown]` (no `[extra]`) al teu `config.toml`:
|
||||
|
||||
```toml
|
||||
[markdown]
|
||||
external_links_class = "external"
|
||||
```
|
||||
|
||||
Això afegirà una petita icona al costat dels enllaços externs:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/external_link_light.webp", dark_src="blog/mastering-tabi-settings/img/external_link_dark.webp", alt="Icona d'enllaç extern", full_width=true) }}
|
||||
|
||||
### Estils CSS personalitzats
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|
@ -256,6 +307,34 @@ Si configures `tag_sorting = "frequency"`, s'ordenaran segons el nombre de publi
|
|||
|
||||
---
|
||||
|
||||
## Sèries
|
||||
|
||||
Per a una explicació detallada, consulta la [documentació de sèries](@/blog/series/index.ca.md).
|
||||
|
||||
### Enllaç per saltar a les publicacions
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
|
||||
| ❌ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
Per defecte, apareix automàticament un enllaç "Salta a les publicacions" al costat del títol de la sèrie quan una sèrie té un contingut de més de 2000 caràcters:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enllaç per saltar a les publicacions de la sèrie", full_width=true) }}
|
||||
|
||||
Estableix `show_jump_to_posts = true` per forçar l'activació de la funció i `show_jump_to_posts = false` per desactivar-la.
|
||||
|
||||
### Indexació de pàgines de sèries
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
|
||||
| ❌ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
Per defecte, les pàgines de sèries s'indexen (usant una indexació basada en 1) segons el `sort_by` de la secció de sèries.
|
||||
|
||||
Estableix `post_listing_index_reversed = true` per invertir aquest índex.
|
||||
|
||||
---
|
||||
|
||||
## Integració amb repositoris Git
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|
@ -314,7 +393,7 @@ quick_navigation_buttons = true
|
|||
- `show_reading_time = false` amaga el temps estimat de lectura.
|
||||
- `quick_navigation_buttons = true` mostra els botons de navegació ràpida.
|
||||
|
||||
Al costat del fitxer `_index.md`, pots crear un fitxer per a cada projecte. Per exemple, aquest és el bloc de metadades per a la pàgina del projecte [tabi](/ca/projects/tabi/):
|
||||
Al costat del fitxer `_index.md`, pots crear un fitxer per a cada projecte. Per exemple, aquest és el bloc de metadades per a la pàgina del projecte [tabi](@/projects/tabi/index.ca.md):
|
||||
|
||||
```toml
|
||||
title = "tabi"
|
||||
|
@ -334,6 +413,33 @@ Quan un usuari faci clic a la imatge o al títol d'un projecte, serà portat a l
|
|||
|
||||
La pàgina del projecte individual es renderitza amb la plantilla predeterminada, tret que estableixis una altra, per exemple, `template = "info-page.html"`.
|
||||
|
||||
#### Filtrar projectes
|
||||
|
||||
Si afegeixes etiquetes als teus projectes, veuràs un filtre d'etiquetes:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/projects_tag_filter_light.webp", dark_src="blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp", alt="Pàgina de projectes amb filtre d'etiquetes", full_width=true) }}
|
||||
|
||||
El sistema de filtratge d'etiquetes utilitza millora progressiva:
|
||||
|
||||
- Sense JavaScript: Les etiquetes enllacen directament a pàgines d'etiquetes dedicades (per exemple, `/tags/nom-de-l-etiqueta`).
|
||||
- Amb JavaScript: Filtratge instantani, sincronització d'URL (#nom-etiqueta) i navegació amb el teclat.
|
||||
|
||||
Per desactivar aquesta funció, estableix `enable_cards_tag_filtering = false` a la secció `[extra]` del fitxer `projects/_index.md` o a `config.toml`.
|
||||
|
||||
{% admonition(type="tip") %}
|
||||
|
||||
Per filtrar projectes per etiquetes, necessites establir etiquetes a la front matter de cada projecte. Per exemple:
|
||||
|
||||
```toml
|
||||
title = "nom del projecte"
|
||||
weight = 40
|
||||
|
||||
[taxonomies]
|
||||
tags = ["etiqueta", "etiqueta 2", "tercera etiqueta"]
|
||||
```
|
||||
|
||||
{% end %}
|
||||
|
||||
### Arxiu
|
||||
|
||||
Afegir una pàgina d'arxiu és similar a afegir una pàgina de projectes. Pots crear un directori a `content/archive/`. Allà, pots crear un fitxer `_index.md` amb el següent encapçalament:
|
||||
|
@ -354,10 +460,14 @@ Per defecte, l'arxiu llistarà les publicacions situades a `blog/`. Per personal
|
|||
section_path = ["blog/", "notes/", "camí-tres/"]
|
||||
```
|
||||
|
||||
**Nota**:
|
||||
L'arxiu mostra les publicacions en ordre cronològic invers (les més recents primer). Pots invertir aquest ordre establint `archive_reverse = true` a la secció `[extra]`:
|
||||
|
||||
- La pàgina d'arxiu només llistarà publicacions amb data.
|
||||
- L'ordre de les publicacions ve determinada per la variable `sort_by` de les seccions arxivades. Aquesta demo utilitza `sort_by = "date"` en `blog/_index.md`.
|
||||
```toml
|
||||
[extra]
|
||||
archive_reverse = true # mostra les publicacions més antigues primer
|
||||
```
|
||||
|
||||
{{ admonition(type="note", title="nota" text="La pàgina d'arxiu només llistarà publicacions que tinguin data al seu encapçalament.") }}
|
||||
|
||||
### Etiquetes
|
||||
|
||||
|
@ -406,6 +516,17 @@ path = "about"
|
|||
|
||||
Fixa't com s'estableix `path = "about"`. Zola situarà la pàgina a `$base_url/about/`. Si vols que la pàgina estigui disponible a `/contacte/`, hauries d'establir `path = "contacte"`.
|
||||
|
||||
La plantilla `info-page.html` també es pot utilitzar per crear landing pages a la ruta arrel (`"/"`). Per fer-ho, l'arxiu `content/_index.md` hauria de ser així:
|
||||
|
||||
```markdown
|
||||
+++
|
||||
title = "Títol de la pàgina"
|
||||
template = "info-page.html"
|
||||
+++
|
||||
|
||||
Contingut amb Markdown.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## SEO
|
||||
|
@ -468,7 +589,19 @@ Si ambdues rutes, relativa i absoluta, són vàlides, la ruta relativa tindrà p
|
|||
|
||||
Ja que segueix la [jerarquia](#jerarquia-de-configuracio), si no està configurat en una pàgina, però sí ho està en una secció, s'utilitzarà la imatge de la secció. Si no està configurat en una pàgina o secció, però sí en `config.toml`, s'utilitzarà la imatge global.
|
||||
|
||||
**Consell**: automatitza la seva creació amb un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [De reservat a rei de les xarxes: automatitzant les vistes prèvies dels enllaços amb Zola](https://osc.garden/ca/blog/automating-social-media-cards-zola/).
|
||||
{{ admonition(type="tip", title="CONSELL", text="Automatitza la seva creació amb un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [Automatitzant les vistes prèvies dels enllaços amb Zola](https://osc.garden/ca/blog/automating-social-media-cards-zola/).") }}
|
||||
|
||||
### Creador del fedivers
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix jerarquia | Requereix JavaScript |
|
||||
|:------:|:------:|:-------------:|:-----------------:|:--------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
Pots mostrar el perfil del fedivers de l'autor en les previsualitzacions d'enllaços de Mastodon configurant la variable `fediverse_creator` al teu `config.toml`. Per exemple, per a @username@example.com, fes servir:
|
||||
|
||||
```toml
|
||||
fediverse_creator = { handle = "username", domain = "example.com" }
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
@ -480,7 +613,9 @@ Ja que segueix la [jerarquia](#jerarquia-de-configuracio), si no està configura
|
|||
|:------:|:------:|:-------------:|:---------------:|:-------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
La barra de navegació és la franja a la part superior de la pàgina que conté el títol del lloc i el menú de navegació. Pots personalitzar els elements que apareixen configurant `menu` en `config.toml`. Per exemple:
|
||||
La barra de navegació és la franja a la part superior de la pàgina que conté el títol del lloc i el menú de navegació. Pots personalitzar els elements que apareixen configurant `menu` en `config.toml`.
|
||||
|
||||
Soporta links relatius per a pàgines internes i links absoluts per a enllaços externs. Per exemple:
|
||||
|
||||
```toml
|
||||
menu = [
|
||||
|
@ -489,6 +624,7 @@ menu = [
|
|||
{ name = "etiquetes", url = "tags", trailing_slash = true },
|
||||
{ name = "projectes", url = "projects", trailing_slash = true },
|
||||
{ name = "sobre nosaltres", url = "about", trailing_slash = true },
|
||||
{ name = "github", url = "https://github.com/welpo/tabi", trailing_slash = false },
|
||||
]
|
||||
```
|
||||
|
||||
|
@ -561,13 +697,21 @@ Establir `copy_button = true` afegirà un petit botó de copiar a la part superi
|
|||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_light.webp", dark_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_dark.webp", alt="Botó de copiar en blocs de codi", full_width=true) }}
|
||||
|
||||
### Mostrar ruta/URL en blocs de codi
|
||||
### Nom del bloc de codi clicable
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
Estableix `add_src_to_code_block = true` per habilitar l'ús del [shortcode `add_src_to_code_block`](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url).
|
||||
En establir `code_block_name_links = true` s'habiliten els enllaços clicables als noms dels blocs de codi. Consulta la [documentació](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url) per veure exemples i ús.
|
||||
|
||||
### Forçar blocs de codi d'esquerra a dreta
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|:------:|:------:|:-------------:|:-----------------:|:--------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
Per defecte, els blocs de codi es renderitzen d'esquerra a dreta, independentment de la direcció general del text. Estableix `force_codeblock_ltr = false` per permetre que els blocs de codi segueixin la direcció del document. Útil per a idiomes de dreta a esquerra que necessiten blocs de codi de dreta a esquerra.
|
||||
|
||||
### Suport per a KaTeX
|
||||
|
||||
|
@ -595,10 +739,12 @@ Consulta la [documentació de Mermaid](@/blog/shortcodes/index.ca.md#diagrames-d
|
|||
|:------:|:------:|:-------------:|:------------------:|:--------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
Les tipus de lletra personalitzades causen parpalleig del text en Firefox. Per resoldre això, tabi carrega un subconjunt de glifs per a la capçalera. Donat que això (lleugerament) augmenta el temps de càrrega inicial, és una bona idea intentar minimitzar la mida d'aquest subconjunt.
|
||||
Les tipus de lletra personalitzades causen parpalleig del text en Firefox. Per resoldre això, tabi carrega un subconjunt de glifs per a la capçalera. Donat que això (lleugerament) augmenta el temps de càrrega inicial, és una bona idea intentar minimitzar la mida d'aquest subconjunt, o desactivar-lo completament si no estàs fent servir un tipus de lletra personalitzat al teu tema.
|
||||
|
||||
Pots crear un subconjunt personalitzat adaptat al teu lloc, guardar-lo com a `static/custom_subset.css`, i fer que es carregui amb `custom_subset = true`.
|
||||
|
||||
Per desactivar el subconjunt, utilitza `enable_subset = false`.
|
||||
|
||||
Per obtenir més informació, incloent instruccions sobre com crear un subconjunt personalitzat, consulta la [documentació](@/blog/custom-font-subset/index.ca.md).
|
||||
|
||||
### Contingut complet al feed
|
||||
|
@ -615,7 +761,10 @@ Per defecte, el feed Atom només conté el resum o descripció de les teves publ
|
|||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
Pots amagar pàgines específiques o seccions senceres del feed amb `hide_from_feed = true`.
|
||||
Pots controlar com apareix el contingut als feeds utilitzant dues configuracions:
|
||||
|
||||
- `hide_from_feed = true`: Amaga el contingut de tots els feeds (feed principal, feeds de secció i feeds d'etiquetes)
|
||||
- `hide_from_main_feed = true`: Amaga el contingut només del feed principal mentre el manté visible als feeds de secció i d'etiquetes
|
||||
|
||||
### Comentaris {#afegir-comentaris}
|
||||
|
||||
|
@ -644,7 +793,7 @@ Pots configurar-los en la secció `[extra.analytics]` del teu arxiu `config.toml
|
|||
- `service`: el servei a utilitzar. Les opcions disponibles són `"goatcounter"`, `"umami", i "plausible"`.
|
||||
|
||||
- `id`: l'identificador únic per al teu servei d'anàlisi. Això varia segons el servei:
|
||||
- Per a GoatCounter, és el codi triat durant el registre. Instàncies auto-allotjades no requereixen aquest camp.
|
||||
- Per a GoatCounter, és el codi triat durant el registre. Instàncies auto-allotjades de GoatCounter no requereixen aquest camp.
|
||||
- Per a Umami, és l'ID del lloc web.
|
||||
- Per a Plausible, és el nom de domini.
|
||||
|
||||
|
@ -692,6 +841,8 @@ Per utilitzar una icona personalitzada, pots afegir-la al directori `static/soci
|
|||
{ name = "custom", url = "https://example.com", icon = "custom" }
|
||||
```
|
||||
|
||||
{{ admonition(type="note", title="NOTA", text="Tots els enllaços a xarxes socials inclouen l'[atribut](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me) `rel='me'`. Això ajuda els motors de cerca i serveis web a verificar que les comptes de xarxes socials et pertanyen.") }}
|
||||
|
||||
### Icona de feed
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
+++
|
||||
title = "Domina la configuración de tabi: guía completa"
|
||||
date = 2023-09-18
|
||||
updated = 2024-09-17
|
||||
updated = 2025-02-16
|
||||
description = "Descubre las múltiples maneras en que puedes personalizar tabi."
|
||||
|
||||
[taxonomies]
|
||||
tags = ["funcionalidad", "tutorial", "preguntas frecuentes"]
|
||||
|
||||
[extra]
|
||||
pinned = true
|
||||
quick_navigation_buttons = true
|
||||
social_media_card = "social_cards/es_blog_mastering_tabi_settings.jpg"
|
||||
+++
|
||||
|
@ -110,37 +111,65 @@ header = {title = "¡Hola! Soy tabi~", img = "blog/mastering-tabi-settings/img/m
|
|||
|
||||
La descripción es contenido Markdown normal, escrito fuera del front matter.
|
||||
|
||||
#### Mostrando publicaciones recientes
|
||||
#### Listando publicaciones recientes
|
||||
|
||||
Si deseas mostrar publicaciones en la página principal, primero necesitas decidir si su ruta será `/` o algo como `/blog`.
|
||||
Para mostrar publicaciones en la página principal, primero debes decidir de dónde se servirán: de la ruta raíz (`/`) o de un subdirectorio (por ejemplo, `/blog`).
|
||||
|
||||
Si quieres servir las publicaciones desde `/`, necesitas configurar `paginate_by = 5` en el front matter de tu archivo `_index.md`. **Nota**: esto no se configura en el apartado `[extra]`, sino en el front matter principal. Ejemplo:
|
||||
**Opción A: Servir publicaciones desde la ruta raíz (`/`)**
|
||||
|
||||
Configura `paginate_by` en el front matter de tu archivo `content/_index.md`:
|
||||
|
||||
```toml
|
||||
title = "Últimas publicaciones"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
paginate_by = 5
|
||||
paginate_by = 5 # Muestra 5 publicaciones por página.
|
||||
|
||||
[extra]
|
||||
header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, el autor del tema" }
|
||||
header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Tu nombre" }
|
||||
```
|
||||
|
||||
Si prefieres servir las publicaciones desde `/blog`, puedes configurar `section_path = "/blog"` en la sección `[extra]`. Esta es la configuración de esta demo:
|
||||
{{ admonition(type="note", text="La configuración `paginate_by` va en el front matter principal, no en la sección `[extra]`.") }}
|
||||
|
||||
**Opción B: Servir publicaciones desde un subdirectorio (por ejemplo, `/blog`)**
|
||||
|
||||
Utiliza `section_path` en la sección `[extra]` de tu archivo `content/_index.md`:
|
||||
|
||||
```toml
|
||||
title = "Publicaciones recientes"
|
||||
title = "Últimas publicaciones"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
# No configures `paginate_by` aquí.
|
||||
|
||||
[extra]
|
||||
header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, el autor del tema" }
|
||||
section_path = "blog/_index.es.md"
|
||||
max_posts = 4
|
||||
header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Tu nombre" }
|
||||
section_path = "blog/_index.md" # Dónde encontrar tus publicaciones.
|
||||
max_posts = 5 # Muestra hasta 5 publicaciones en la página principal.
|
||||
```
|
||||
|
||||
Fíjate que si configuras `section_path`, no necesitas configurar `paginate_by`. Puedes establecer `max_posts` para determinar el número de publicaciones que deseas mostrar en la página principal.
|
||||
{{ admonition(type="warning", title="ALERTA", text="No configures `paginate_by` y `section_path` a la vez. Estas configuraciones son mutuamente excluyentes y usarlas juntas puede resultar en que no se muestren publicaciones.") }}
|
||||
|
||||
El `title` es el encabezado que aparece sobre las publicaciones.
|
||||
Notas adicionales:
|
||||
|
||||
- El `title` en el front matter establece el título que aparece sobre las publicaciones.
|
||||
- Usa la ruta completa al archivo `_index.md` de la sección para `section_path`. Usar `section_path = "blog/"` no funcionará.
|
||||
|
||||
##### Fijar publicaciones
|
||||
|
||||
Puedes fijar publicaciones para mantenerlas en la parte superior de la página principal. En esta demo, esta publicación está fijada, por lo que aparece primera con un icono y etiqueta de "fijada":
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/pinned_post_light.webp", dark_src="blog/mastering-tabi-settings/img/pinned_post_dark.webp", alt="Entrada fijada", full_width=true) }}
|
||||
|
||||
Las publicaciones fijadas se muestran primero, manteniendo su orden relativo según el `sort_by` de la sección, seguidas por el resto de las publicaciones.
|
||||
|
||||
Para fijar una publicación, añade lo siguiente a su front matter:
|
||||
|
||||
```toml
|
||||
[extra]
|
||||
pinned = true
|
||||
```
|
||||
|
||||
{{ admonition(type="info", text="Este ajuste solo afecta a las páginas principales del sitio (como `/`, `/es/`, `/fr/`). Otras secciones como `blog/`, `tags/` o `archive/` muestran las publicaciones en su orden habitual.") }}
|
||||
|
||||
{{ admonition(type="warning", text='Cuando se utiliza la paginación (`paginate_by`), las publicaciones destacadas pueden aparecer dos veces: una vez en la parte superior de la primera página, y otra en su posición cronológica normal en páginas posteriores.') }}
|
||||
|
||||
##### Mostrar la fecha de los artículos en el listado
|
||||
|
||||
|
@ -150,6 +179,10 @@ Por defecto, cuando se listan los artículos, se muestra la fecha de creación.
|
|||
- `updated`: Muestra solo la fecha de la última actualización del artículo. Si no hay fecha de actualización, muestra la fecha de publicación original.
|
||||
- `both`: Muestra tanto la fecha de publicación original como la fecha de la última actualización.
|
||||
|
||||
{% admonition(type="tip") %}
|
||||
Esta configuración sigue la jerarquía: puedes establecer un valor global en `config.toml` o configurarlo para secciones específicas en su archivo `_index.md`. En ambos casos, añádelo a la sección `[extra]`.
|
||||
{% end %}
|
||||
|
||||
#### Listado de proyectos
|
||||
|
||||
Puedes mostrar una selección de proyectos en tu página principal. Para hacer esto, primero necesitarás configurar el directorio `projects`.
|
||||
|
@ -205,6 +238,25 @@ Haz clic en la imagen para comparar las fuentes:
|
|||
|
||||
{{ image_toggler(default_src="blog/mastering-tabi-settings/img/serif.webp", toggled_src="blog/mastering-tabi-settings/img/sans-serif.webp", default_alt="Fuente serif", toggled_alt="Fuente sans-serif", full_width=true) }}
|
||||
|
||||
### Indicador de enlaces externos
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue Jerarquía | Requiere JavaScript |
|
||||
|:------:|:-------:|:-------------:|:----------------:|:------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
{{ admonition(type="info", text="Requiere Zola 0.20.0 o posterior.") }}
|
||||
|
||||
Si deseas añadir un icono a los enlaces externos, configura la sección `[markdown]` (no `[extra]`) en tu `config.toml`:
|
||||
|
||||
```toml
|
||||
[markdown]
|
||||
external_links_class = "external"
|
||||
```
|
||||
|
||||
Esto añadirá un pequeño icono junto a los enlaces externos:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/external_link_light.webp", dark_src="blog/mastering-tabi-settings/img/external_link_dark.webp", alt="Icono de enlace externo", full_width=true) }}
|
||||
|
||||
### Estilos CSS personalizados
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|
||||
|
@ -256,6 +308,34 @@ Si configuras `tag_sorting = "frequency"`, se ordenarán según el número de pu
|
|||
|
||||
---
|
||||
|
||||
## Series
|
||||
|
||||
Para una explicación detallada, consulta la [documentación de series](@/blog/series/index.es.md).
|
||||
|
||||
### Enlace para saltar a las publicaciones
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue jerarquía | Requiere JavaScript |
|
||||
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
|
||||
| ❌ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
Por defecto, aparece automáticamente un enlace "Saltar a publicaciones" junto al título de la serie cuando una serie tiene un contenido de más de 2000 caracteres:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enlace para saltar a las publicaciones de la serie", full_width=true) }}
|
||||
|
||||
Establece `show_jump_to_posts = true` para forzar la activación de la función y `show_jump_to_posts = false` para desactivarla.
|
||||
|
||||
### Indexación de páginas de series
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|
||||
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
|
||||
| ❌ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
Por defecto, las páginas de series se indexan (usando una indexación basada en 1) según el `sort_by` de la sección de series.
|
||||
|
||||
Establece `post_listing_index_reversed = true` para invertir el índice.
|
||||
|
||||
---
|
||||
|
||||
## Integración con repositorios Git
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|
||||
|
@ -314,7 +394,7 @@ quick_navigation_buttons = true
|
|||
- `show_reading_time = false` oculta el tiempo estimado de lectura.
|
||||
- `quick_navigation_buttons = true` muestra los botones de navegación rápida.
|
||||
|
||||
Junto al archivo `_index.md`, puedes crear un archivo para cada proyecto. Por ejemplo, este es el bloque de metadatos para la página del proyecto [tabi](/es/projects/tabi/):
|
||||
Junto al archivo `_index.md`, puedes crear un archivo para cada proyecto. Por ejemplo, este es el bloque de metadatos para la página del proyecto [tabi](@/projects/tabi/index.es.md):
|
||||
|
||||
```toml
|
||||
title = "tabi"
|
||||
|
@ -334,6 +414,33 @@ Cuando un usuario haga clic en la imagen o el título de un proyecto, será llev
|
|||
|
||||
La página del proyecto individual se renderiza con la plantilla predeterminada, a menos que establezcas otra, por ejemplo, `template = "info-page.html"`.
|
||||
|
||||
#### Filtrar proyectos
|
||||
|
||||
Si agregas etiquetas a tus proyectos, verás un filtro de etiquetas:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/projects_tag_filter_light.webp", dark_src="blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp", alt="Página de proyectos con filtro de etiquetas", full_width=true) }}
|
||||
|
||||
El sistema de filtrado de etiquetas utiliza mejora progresiva:
|
||||
|
||||
- Sin JavaScript: Las etiquetas enlazan directamente a páginas de etiquetas dedicadas (por ejemplo, `/tags/nombre-etiqueta`).
|
||||
- Con JavaScript: Filtrado instantáneo, sincronización de URL (#nombre-etiqueta) y navegación por teclado.
|
||||
|
||||
Para desactivar esta función, establece `enable_cards_tag_filtering = false` en la sección `[extra]` del archivo `projects/_index.md` o en `config.toml`.
|
||||
|
||||
{% admonition(type="tip") %}
|
||||
|
||||
Para filtrar proyectos por etiquetas, necesitas establecer etiquetas en el front matter de cada proyecto. Por ejemplo:
|
||||
|
||||
```toml
|
||||
title = "nombre del proyecto"
|
||||
weight = 40
|
||||
|
||||
[taxonomies]
|
||||
tags = ["etiqueta uno", "etiqueta 2", "tercera etiqueta"]
|
||||
```
|
||||
|
||||
{% end %}
|
||||
|
||||
### Archivo
|
||||
|
||||
Agregar una página de archivo es similar a agregar una página de proyectos. Puedes crear un directorio en `content/archive/`. Allí, puedes crear un archivo `_index.md` con el siguiente encabezado:
|
||||
|
@ -354,10 +461,14 @@ Por defecto, el archivo mostrará las publicaciones ubicadas en `blog/`. Para pe
|
|||
section_path = ["blog/", "notas/", "ruta-tres/"]
|
||||
```
|
||||
|
||||
**Nota**:
|
||||
El archivo muestra las publicaciones en orden cronológico inverso (las más recientes primero). Puedes invertir este orden estableciendo `archive_reverse = true` en la sección `[extra]`:
|
||||
|
||||
- La página de Archivo sólo listará publicaciones con fecha.
|
||||
- El orden las publicaciones viene determinada por la variable `sort_by` de las secciones archivadas. Esta demo utiliza `sort_by = "date"` en `blog/_index.md`.
|
||||
```toml
|
||||
[extra]
|
||||
archive_reverse = true # muestra las publicaciones más antiguas primero
|
||||
```
|
||||
|
||||
{{ admonition(type="note", title="nota" text="La página de Archivo sólo listará publicaciones que tengan fecha en su encabezado.") }}
|
||||
|
||||
### Etiquetas
|
||||
|
||||
|
@ -406,6 +517,17 @@ path = "about"
|
|||
|
||||
Fíjate cómo se establece `path = "about"`. Zola colocará la página en `$base_url/about/`. Si deseas que la página esté disponible en `/contacto/`, tendrías que establecer `path = "contacto"`.
|
||||
|
||||
La plantilla `info-page.html` también se puede utilizar para crear lading pages en la ruta raíz (`"/"`). Para hacerlo, el archivo `content/_index.md` debería verse así:
|
||||
|
||||
```markdown
|
||||
+++
|
||||
title = "Título de la página"
|
||||
template = "info-page.html"
|
||||
+++
|
||||
|
||||
Contenido con Markdown.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## SEO
|
||||
|
@ -468,7 +590,19 @@ Si ambas rutas, relativa y absoluta, son válidas, la ruta relativa tendrá prio
|
|||
|
||||
Dado que sigue la [jerarquía](#jerarquia-de-configuracion), si no está configurado en una página, pero sí lo está en una sección, se utilizará la imagen de la sección. Si no está configurado en una página o sección, pero sí en `config.toml`, se usará la imagen global.
|
||||
|
||||
**Consejo**: automatiza su creación con un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [De reservado a rey de las redes: automatizando las vistas previas de los enlaces con Zola](https://osc.garden/es/blog/automating-social-media-cards-zola/).
|
||||
{{ admonition(type="tip", title="CONSEJO", text="Automatiza su creación con un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [Automatizando las vistas previas de los enlaces con Zola](https://osc.garden/es/blog/automating-social-media-cards-zola/).") }}
|
||||
|
||||
### Creador del fediverso
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue jerarquía | Requiere JavaScript |
|
||||
|:------:|:-------:|:-------------:|:----------------:|:-------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
Puedes mostrar tu perfil del fediverso en las vistas previas de enlaces de Mastodon configurando la variable `fediverse_creator` en tu `config.toml`. Por ejemplo, para @username@example.com, usa:
|
||||
|
||||
```toml
|
||||
fediverse_creator = { handle = "username", domain = "example.com" }
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
@ -480,7 +614,9 @@ Dado que sigue la [jerarquía](#jerarquia-de-configuracion), si no está configu
|
|||
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
La barra de navegación es la barra en la parte superior de la página que contiene el título del sitio y el menú de navegación. Puedes personalizar los elementos que aparecen configurando `menu` en `config.toml`. Por ejemplo:
|
||||
La barra de navegación es la barra en la parte superior de la página que contiene el título del sitio y el menú de navegación. Puedes personalizar los elementos que aparecen configurando `menu` en `config.toml`.
|
||||
|
||||
Soporta links relativos para páginas internas y links absolutos para enlaces externos. Por ejemplo:
|
||||
|
||||
```toml
|
||||
menu = [
|
||||
|
@ -489,6 +625,7 @@ menu = [
|
|||
{ name = "etiquetas", url = "tags", trailing_slash = true },
|
||||
{ name = "proyectos", url = "projects", trailing_slash = true },
|
||||
{ name = "acerca de", url = "about", trailing_slash = true },
|
||||
{ name = "github", url = "https://github.com/welpo/tabi", trailing_slash = false },
|
||||
]
|
||||
```
|
||||
|
||||
|
@ -561,13 +698,21 @@ Establecer `copy_button = true` añadirá un pequeño botón de copiar en la par
|
|||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_light.webp", dark_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_dark.webp", alt="Botón de copiar en bloques de código", full_width=true) }}
|
||||
|
||||
### Mostrar ruta/URL en bloques de código
|
||||
### Nombres de bloques de código clicables
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|
||||
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
Establece `add_src_to_code_block = true` para habilitar el uso del [shortcode `add_src_to_code_block`](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url).
|
||||
Establece `code_block_name_links = true` para habilitan los enlaces clickables en los nombres de bloques de código. Consulta la [documentación](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url) para ver ejemplos y uso.
|
||||
|
||||
### Forzar bloques de código de izquierda a derecha
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|
||||
|:------:|:-------:|:-------------:|:----------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
Por defecto, los bloques de código se renderizan de izquierda a derecha, independientemente de la dirección general del texto. Establece `force_codeblock_ltr = false` para permitir que los bloques de código sigan la dirección del documento. Útil para idiomas de derecha a izquierda que necesitan bloques de código de derecha a izquierda.
|
||||
|
||||
### Soporte para KaTeX
|
||||
|
||||
|
@ -595,10 +740,12 @@ Consulta la [documentación de Mermaid](@/blog/shortcodes/index.es.md#diagramas-
|
|||
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
Las fuentes personalizadas causan parpadeo del texto en Firefox. Para solucionar esto, tabi carga un subconjunto de glifos para el encabezado. Dado que esto (ligeramente) aumenta el tiempo de carga inicial, es una buena idea intentar minimizar el tamaño de este subconjunto.
|
||||
Las fuentes personalizadas causan parpadeo del texto en Firefox. Para solucionar esto, tabi carga un subconjunto de glifos para el encabezado. Dado que esto (ligeramente) aumenta el tiempo de carga inicial, es una buena idea intentar minimizar el tamaño de este subconjunto, o desactivarlo por completo si no estás usando una fuente personalizada en tu tema.
|
||||
|
||||
Puedes crear un subconjunto personalizado adaptado a tu sitio, guardarlo como `static/custom_subset.css`, y hacer que se cargue con `custom_subset = true`.
|
||||
|
||||
Para desactivar el subconjunto, puedes usar `enable_subset = false`.
|
||||
|
||||
Para obtener más información, incluyendo instrucciones sobre cómo crear un subconjunto personalizado, consulta la [documentación](@/blog/custom-font-subset/index.es.md).
|
||||
|
||||
### Contenido completo en el feed
|
||||
|
@ -615,7 +762,10 @@ Por defecto, el feed Atom solo contiene el resumen/descripción de tus publicaci
|
|||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
Puedes ocultar páginas específicas o secciones enteras del feed con `hide_from_feed = true`.
|
||||
Puedes controlar cómo aparece el contenido en los feeds usando dos configuraciones:
|
||||
|
||||
- `hide_from_feed = true`: Oculta el contenido de todos los feeds (feed principal, feeds de sección y feeds de etiquetas)
|
||||
- `hide_from_main_feed = true`: Oculta el contenido solo del feed principal mientras lo mantiene visible en los feeds de sección y de etiquetas
|
||||
|
||||
### Comentarios {#añadir-comentarios}
|
||||
|
||||
|
@ -644,7 +794,7 @@ Puedes configurarlos en la sección `[extra.analytics]` de tu archivo `config.to
|
|||
- `service`: el servicio a utilizar. Las opciones disponibles son `"goatcounter"`, `"umami"`, y `"plausible"`.
|
||||
|
||||
- `id`: el identificador único para tu servicio de análisis. Esto varía según el servicio:
|
||||
- Para GoatCounter, es el código elegido durante el registro. Instancias auto-alojadas no requieren este campo.
|
||||
- Para GoatCounter, es el código elegido durante el registro. Instancias auto-alojadas de GoatCounter no requieren este campo.
|
||||
- Para Umami, es la ID del sitio web.
|
||||
- Para Plausible, es el nombre de dominio.
|
||||
|
||||
|
@ -694,6 +844,8 @@ Para usar un icono personalizado, puedes añadirlo al directorio `static/social_
|
|||
{ name = "custom", url = "https://example.com", icon = "custom" }
|
||||
```
|
||||
|
||||
{{ admonition(type="note", title="NOTA", text="Todos los enlaces sociales incluyen el [atributo](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me) `rel='me'`. Esto ayuda a los motores de búsqueda y servicios web a verificar que las cuentas de redes sociales te pertenecen.") }}
|
||||
|
||||
### Icono de feed
|
||||
|
||||
| Página | Sección | `config.toml` | Respeta jerarquía | Requiere JavaScript |
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
+++
|
||||
title = "Mastering tabi Settings: A Comprehensive Guide"
|
||||
date = 2023-09-18
|
||||
updated = 2024-09-17
|
||||
updated = 2025-02-16
|
||||
description = "Discover the many ways you can customise your tabi site."
|
||||
|
||||
[taxonomies]
|
||||
tags = ["showcase", "tutorial", "FAQ"]
|
||||
|
||||
[extra]
|
||||
pinned = true
|
||||
quick_navigation_buttons = true
|
||||
social_media_card = "social_cards/blog_mastering_tabi_settings.jpg"
|
||||
+++
|
||||
|
@ -112,35 +113,63 @@ The description is regular Markdown content, set outside the front matter.
|
|||
|
||||
#### Listing Recent Posts
|
||||
|
||||
If you'd like to show posts on the main page, you first need to decide whether their path will be `/` or something like `/blog`.
|
||||
To show posts on your main page, you first need to decide where these posts will be served from: the root path (`/`) or a subdirectory (e.g., `/blog`).
|
||||
|
||||
If you want to serve the posts from `/`, you need to set `paginate_by = 5` in the front matter of your `_index.md` file. **Note**: this is not in the `[extra]` section, but in the main front matter. Example:
|
||||
**Option A: Serve posts from the root path (`/`)**
|
||||
|
||||
```toml
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
paginate_by = 5
|
||||
|
||||
[extra]
|
||||
header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, the theme's author" }
|
||||
```
|
||||
|
||||
If you'd rather serve the posts from `/blog`, you can set `section_path = "/blog"` in the `[extra]` section. This is the setup of this demo:
|
||||
Set `paginate_by` in the front matter of your `content/_index.md` file:
|
||||
|
||||
```toml
|
||||
title = "Latest posts"
|
||||
sort_by = "date"
|
||||
template = "section.html"
|
||||
paginate_by = 5 # Show 5 posts per page.
|
||||
|
||||
[extra]
|
||||
header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, the theme's author" }
|
||||
section_path = "blog/_index.md"
|
||||
max_posts = 4
|
||||
header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Your Name" }
|
||||
```
|
||||
|
||||
Notice how if you set `section_path`, you don't need to set `paginate_by`. You can set `max_posts` to the determine the number of posts you want to show on the main page.
|
||||
{{ admonition(type="note", text="The `paginate_by` setting goes in the main front matter, not in the `[extra]` section.") }}
|
||||
|
||||
The `title` is the header that appears above the posts.
|
||||
**Option B: Serve posts from a subdirectory (e.g., `/blog`)**
|
||||
|
||||
Use `section_path` in the `[extra]` section of your `content/_index.md` file:
|
||||
|
||||
```toml
|
||||
title = "Latest posts"
|
||||
sort_by = "date"
|
||||
# Do not set `paginate_by` here.
|
||||
|
||||
[extra]
|
||||
header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Your Name" }
|
||||
section_path = "blog/_index.md" # Where to find your posts.
|
||||
max_posts = 5 # Show up to 5 posts on the main page.
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", text="Do not set both `paginate_by` and `section_path`. These settings are mutually exclusive and using both may result in no posts being displayed.") }}
|
||||
|
||||
Additional notes:
|
||||
|
||||
- The `title` in the front matter sets the header that appears above the posts.
|
||||
- Use the full path to the section's `_index.md` file for `section_path`. Using `section_path = "blog/"` will not work.
|
||||
|
||||
##### Pinning Posts
|
||||
|
||||
You can pin posts to keep them at the top of the main page listing. In this demo, this post is pinned, so it appears first with a "pinned" icon and label:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/pinned_post_light.webp", dark_src="blog/mastering-tabi-settings/img/pinned_post_dark.webp", alt="Pinned post", full_width=true) }}
|
||||
|
||||
Pinned posts are shown first, maintaining their relative order of the section's `sort_by`, followed by regular posts.
|
||||
|
||||
To pin a post, add the following to its front matter:
|
||||
|
||||
```toml
|
||||
[extra]
|
||||
pinned = true
|
||||
```
|
||||
|
||||
{{ admonition(type="info", text="This setting only affects your site's main pages (like `/`, `/es/`, `/fr/`). Other sections like `blog/`, `tags/`, or `archive/` show posts in their normal order.") }}
|
||||
|
||||
{{ admonition(type="warning", text='When using pagination (`paginate_by`), pinned posts may appear twice: once on top of page 1, and again in their normal chronological position on subsequent pages.') }}
|
||||
|
||||
##### Display the Date of Posts in Listing
|
||||
|
||||
|
@ -154,6 +183,10 @@ By default, when listing posts, the date of post creation is shown. You can conf
|
|||
post_listing_date = "date"
|
||||
```
|
||||
|
||||
{% admonition(type="tip") %}
|
||||
This setting follows the hierarchy: you can set a global value in `config.toml` or override it for specific sections in their `_index.md` file. In both cases, add it to the `[extra]` section.
|
||||
{% end %}
|
||||
|
||||
#### Listing Projects
|
||||
|
||||
You can showcase a selection of projects on your main page. To do this, you'll need to set up the `projects` directory first.
|
||||
|
@ -209,6 +242,25 @@ Click on the image below to compare the two looks:
|
|||
|
||||
{{ image_toggler(default_src="blog/mastering-tabi-settings/img/serif.webp", toggled_src="blog/mastering-tabi-settings/img/sans-serif.webp", default_alt="Serif font", toggled_alt="Sans-serif font", full_width=true) }}
|
||||
|
||||
### External Link Indicator
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
{{ admonition(type="info", text="Requires Zola 0.20.0 or later.") }}
|
||||
|
||||
If you'd like to add an icon to external links, configure the `[markdown]` (not `[extra]`) section in your `config.toml`:
|
||||
|
||||
```toml
|
||||
[markdown]
|
||||
external_links_class = "external"
|
||||
```
|
||||
|
||||
This will add a small icon next to external links:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/external_link_light.webp", dark_src="blog/mastering-tabi-settings/img/external_link_dark.webp", alt="External link icon", full_width=true) }}
|
||||
|
||||
### Custom CSS
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|
@ -261,6 +313,34 @@ Setting `tag_sorting = "frequency"` will sort them by number-of-posts (descendin
|
|||
|
||||
---
|
||||
|
||||
## Series
|
||||
|
||||
For a detailed explanation of the series feature, see the [series documentation](@/blog/series/index.md).
|
||||
|
||||
### Jump to posts link
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ❌ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
By default, a "Jump to posts" link automatically appears next to the series title when a series has a content over 2000 characters:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="jump to series posts link", full_width=true) }}
|
||||
|
||||
Set `show_jump_to_posts = true` to force the feature on and `show_jump_to_posts = false` to force it off.
|
||||
|
||||
### Series pages indexation
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ❌ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
By default, series page are indexed (using a 1-based indexing) as per the series section `sort_by`.
|
||||
|
||||
Set `post_listing_index_reversed = true` to reverse this index.
|
||||
|
||||
---
|
||||
|
||||
## Git Repository Integration
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|
@ -299,7 +379,7 @@ Clicking on this link will take you to the commit history of the post, where you
|
|||
|
||||
### Projects
|
||||
|
||||
tabi has a built-in projects template. To enable it, you can create a directory in `content/projects/`. There, you can create a `_index.md` file with the following front matter:
|
||||
tabi has a built-in projects (cards) template. To enable it, you can create a directory in `content/projects/`. There, you can create a `_index.md` file with the following front matter:
|
||||
|
||||
```toml
|
||||
title = "Projects"
|
||||
|
@ -319,11 +399,11 @@ quick_navigation_buttons = true
|
|||
- `show_reading_time = false` hides the [reading time](#reading-time).
|
||||
- `quick_navigation_buttons = true` shows the [quick navigation buttons](#quick-navigation-buttons) are shown.
|
||||
|
||||
Alongside the `_index.md` file, you can create a file for each project. For example, this is the front matter for the [tabi project page](/projects/tabi/):
|
||||
Alongside the `_index.md` file, you can create a file for each project. For example, this is the front matter for the [tabi project page](@/projects/tabi/index.md):
|
||||
|
||||
```toml
|
||||
title = "tabi"
|
||||
description = "A fast, lightweight, and modern Zola theme with multi-language support."
|
||||
description = "A feature-rich modern Zola theme with first-class multi-language support."
|
||||
weight = 1
|
||||
|
||||
[extra]
|
||||
|
@ -339,6 +419,33 @@ When a user clicks on the image or title of a project, they will be taken to the
|
|||
|
||||
The individual project's page is rendered with the default template, unless you set another one, e.g. `template = "info-page.html"`.
|
||||
|
||||
#### Filtering Projects
|
||||
|
||||
If you add tags to your projects, you will see a tag filter:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/projects_tag_filter_light.webp", dark_src="blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp", alt="Projects page with tag filter", full_width=true) }}
|
||||
|
||||
The tag filtering system uses progressive enhancement:
|
||||
|
||||
- Without JavaScript: Tags link directly to dedicated tag pages (e.g. `/tags/tag-name`)
|
||||
- With JavaScript: Instant filtering, URL syncing (#tag-name), and keyboard navigation
|
||||
|
||||
To disable this feature, set `enable_cards_tag_filtering = false` in the `[extra]` section of the `projects/_index.md` file or in `config.toml`.
|
||||
|
||||
{% admonition(type="tip") %}
|
||||
|
||||
To filter projects by tags, you need to set tags in the front matter of each project. For example:
|
||||
|
||||
```toml
|
||||
title = "project name"
|
||||
weight = 40
|
||||
|
||||
[taxonomies]
|
||||
tags = ["tag one", "tag 2", "third tag"]
|
||||
```
|
||||
|
||||
{% end %}
|
||||
|
||||
### Archive
|
||||
|
||||
Adding an archive page is similar to adding a projects page. You can create a directory in `content/archive/`. There, you can create a `_index.md` file with the following front matter:
|
||||
|
@ -359,10 +466,14 @@ By default, the archive will list posts located in `blog/`. To customise this, y
|
|||
section_path = ["blog/", "notes/", "path-three/"]
|
||||
```
|
||||
|
||||
**Notes**:
|
||||
The archive displays posts in reverse chronological order (newest first). You can reverse this order by setting `archive_reverse = true` in the `[extra]` section:
|
||||
|
||||
- the Archive page will only list posts that have a date in their front matter.
|
||||
- Post sorting is determined by the `sort_by` variable of the sections you are archiving. This demo uses `sort_by = "date"` set in the `blog/_index.md`.
|
||||
```toml
|
||||
[extra]
|
||||
archive_reverse = true # displays oldest posts first.
|
||||
```
|
||||
|
||||
{{ admonition(type="note", text="The Archive page will only list posts that have a date in their front matter.") }}
|
||||
|
||||
### Tags
|
||||
|
||||
|
@ -411,6 +522,17 @@ path = "about"
|
|||
|
||||
Notice how the `path` is set to `about`. Zola will place the page at `$base_url/about/`. If you'd like to have the page available at `/contact/`, you'd set `path = "contact"`.
|
||||
|
||||
The `info-page.html` template can also be used to create landing pages at the path root (`"/"`). To do that, the `content/_index.md` file should look like this:
|
||||
|
||||
```markdown
|
||||
+++
|
||||
title = "Landing Page Title"
|
||||
template = "info-page.html"
|
||||
+++
|
||||
|
||||
Place your landing page Markdown content here.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## SEO
|
||||
|
@ -473,7 +595,21 @@ If both relative and absolute paths are valid, the relative path will take prece
|
|||
|
||||
Since it follows the [hierarchy](#settings-hierarchy), if it's not set on a page, but is set on a section, the section's image will be used. If it's not set on a page or section, but is set in `config.toml`, the global image will be used.
|
||||
|
||||
**Protip**: automate their creation with a [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [From Bashful to Social Butterfly: Automating Link Previews for Zola Sites](https://osc.garden/blog/automating-social-media-cards-zola/).
|
||||
{{ admonition(type="tip", title="PROTIP", text="Automate their creation with a [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [Automating Link Previews for Zola Sites](https://osc.garden/blog/automating-social-media-cards-zola/).") }}
|
||||
|
||||
### Fediverse Creator
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
You can highlight your fediverse profile in Mastodon link previews by setting the `fediverse_creator` variable in your `config.toml`. For example, for @username@example.com, use:
|
||||
|
||||
```toml
|
||||
fediverse_creator = { handle = "username", domain = "example.com" }
|
||||
```
|
||||
|
||||
This adds metadata to your HTML, allowing Mastodon to display the author's fediverse profile when your content is shared.
|
||||
|
||||
---
|
||||
|
||||
|
@ -485,7 +621,9 @@ Since it follows the [hierarchy](#settings-hierarchy), if it's not set on a page
|
|||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
The navigation bar is the bar at the top of the page that contains the site title and the navigation menu. You can customise which items appear by setting `menu` in `config.toml`. For example:
|
||||
The navigation bar is the bar at the top of the page that contains the site title and the navigation menu. You can customise which items appear by setting `menu` in `config.toml`.
|
||||
|
||||
The menu supports both relative URLs for internal pages and absolute URLs for external links. For example:
|
||||
|
||||
```toml
|
||||
menu = [
|
||||
|
@ -494,6 +632,7 @@ menu = [
|
|||
{ name = "tags", url = "tags", trailing_slash = true },
|
||||
{ name = "projects", url = "projects", trailing_slash = true },
|
||||
{ name = "about", url = "about", trailing_slash = true },
|
||||
{ name = "github", url = "https://github.com/welpo/tabi", trailing_slash = false },
|
||||
]
|
||||
```
|
||||
|
||||
|
@ -569,13 +708,21 @@ Setting `copy_button = true` will add a small copy button to the top right of co
|
|||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_light.webp", dark_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_dark.webp" alt="Copy button on code blocks", full_width=true) }}
|
||||
|
||||
### Source/Path on Code Blocks
|
||||
### Clickable Code Block Names
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
Setting `add_src_to_code_block = true` enables the use of the [`add_src_to_code_block` shortcode](@/blog/shortcodes/index.md#show-source-or-path).
|
||||
Setting `code_block_name_links = true` enables URLs in code block names to become clickable links. Check out the [documentation](@/blog/shortcodes/index.md#show-source-or-path) for examples and usage.
|
||||
|
||||
### Force Code Blocks LTR
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
By default, code blocks are rendered left-to-right, regardless of the overall text direction. Set `force_codeblock_ltr = false` to allow code blocks to follow the document's text direction. Useful for RTL languages needing RTL code blocks.
|
||||
|
||||
### KaTeX Support
|
||||
|
||||
|
@ -603,9 +750,9 @@ See the [Mermaid documentation](@/blog/shortcodes/index.md#mermaid-diagrams) for
|
|||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ❌ | ❌ | ✅ | ❌ | ❌ |
|
||||
|
||||
Custom fonts cause flashing text in Firefox. To amend this, tabi loads a subset of glyphs for the header. Since this (slightly) increases the initial load time, it's a good idea to try and minimise the size of this subset.
|
||||
Custom fonts cause flashing text in Firefox. To amend this, tabi loads a subset of glyphs for the header. Since this (slightly) increases the initial load time, it's a good idea to try and minimise the size of this subset, or disable it completely if you're not using a custom font in your skin.
|
||||
|
||||
You can create a custom subset tailored to your site, save it as `static/custom_subset.css`, and have it load with `custom_subset = true`.
|
||||
You can create a custom subset tailored to your site, save it as `static/custom_subset.css`, and have it load with `custom_subset = true`. Disabling the subset can be done with `enable_subset = false`.
|
||||
|
||||
For more information, including instructions on how to create a custom subset, see the [docs](@/blog/custom-font-subset/index.md).
|
||||
|
||||
|
@ -623,7 +770,10 @@ By default, the Atom feed only contains the summary/description of your posts. Y
|
|||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
You can hide specific pages or entire sections from your feed by setting `hide_from_feed = true`.
|
||||
You can control how content appears in your feeds using two settings:
|
||||
|
||||
1. `hide_from_feed = true`: Hides content from all feeds (main, section, and tag feeds)
|
||||
2. `hide_from_main_feed = true`: Hides content only from the main feed while keeping it visible in section and tag feeds
|
||||
|
||||
### Comments {#adding-comments}
|
||||
|
||||
|
@ -652,7 +802,7 @@ You can set them up in the `[extra.analytics]` section of your `config.toml`.
|
|||
- `service`: Specifies which analytics service to use. Supported options are `"goatcounter"`, `"umami"`, and `"plausible"`.
|
||||
|
||||
- `id`: The unique identifier for your analytics service. This varies based on the service:
|
||||
- For GoatCounter, it's the code chosen during signup. Self-hosted instances don't require this field.
|
||||
- For GoatCounter, it's the code chosen during signup. Self-hosted instances of GoatCounter don't require this field.
|
||||
- For Umami, it's the website ID.
|
||||
- For Plausible, it's the domain name.
|
||||
|
||||
|
@ -702,6 +852,8 @@ To use a custom icon, you can add it to your site's `static/social_icons` direct
|
|||
{ name = "custom", url = "https://example.com", icon = "custom" }
|
||||
```
|
||||
|
||||
{{ admonition(type="note", text="All social links include the `rel='me'` [attribute](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me). This helps search engines and web services verify that the social media accounts are owned by you.") }}
|
||||
|
||||
### Feed Icon
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|
|
BIN
content/blog/series/img/jump_to_series_posts_dark.webp
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
content/blog/series/img/jump_to_series_posts_light.webp
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
content/blog/series/img/series_dark.webp
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
content/blog/series/img/series_light.webp
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
content/blog/series/img/series_reversed_dark.webp
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
content/blog/series/img/series_reversed_light.webp
Normal file
After Width: | Height: | Size: 26 KiB |
409
content/blog/series/index.ca.md
Normal file
|
@ -0,0 +1,409 @@
|
|||
+++
|
||||
title = "Guia completa sobre sèries"
|
||||
date = 2024-11-08
|
||||
updated = 2025-02-15
|
||||
description = "Aprèn a organitzar les teves publicacions en sèries seqüencials, perfectes per a tutorials, cursos i històries de diverses parts."
|
||||
|
||||
[taxonomies]
|
||||
tags = ["funcionalitat", "tutorial", "preguntes freqüents", "sèries"]
|
||||
|
||||
[extra]
|
||||
quick_navigation_buttons = true
|
||||
toc = true
|
||||
mermaid = true
|
||||
social_media_card = "social_cards/ca_blog_series.jpg"
|
||||
+++
|
||||
|
||||
Una sèrie organitza publicacions relacionades en ordre seqüencial, similar als capítols d'un llibre. A diferència de les etiquetes, que simplement agrupen contingut relacionat, les sèries suggereixen un ordre específic de lectura de principi a fi.
|
||||
|
||||
Les publicacions dins d'una sèrie no necessiten publicar-se de forma consecutiva; la funció de sèries reuneix publicacions temàticament vinculades en una seqüència coherent.
|
||||
|
||||
El següent diagrama il·lustra com les publicacions de la sèrie (3, 5 i 8) existeixen dins del flux principal del blog mentre mantenen la seva pròpia seqüència ordenada dins de Sèrie 1.
|
||||
|
||||
{% mermaid(full_width=true) %}
|
||||
flowchart
|
||||
subgraph main[BLOG]
|
||||
P1[Post 1]
|
||||
P2[P2]
|
||||
P3[P3]
|
||||
P4[P4]
|
||||
P5[P5]
|
||||
P6[P6]
|
||||
P7[P7]
|
||||
P8[P8]
|
||||
P9[P9]
|
||||
end
|
||||
subgraph series1[SÈRIE 1]
|
||||
PS1["Post Sèrie 1 (=P3)"]
|
||||
PS2["Post Sèrie 2 (=P5)"]
|
||||
PS3["Post Sèrie 3 (=P8)"]
|
||||
end
|
||||
P3 o-.-o PS1
|
||||
P5 o-.-o PS2
|
||||
P8 o-.-o PS3
|
||||
{% end %}
|
||||
|
||||
## Inici ràpid
|
||||
|
||||
1. Crea un directori per a la teva sèrie
|
||||
2. Crea `_index.md` al directori de la sèrie
|
||||
3. Configura el front matter de `_index.md`:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
title = "Aprenent Rust"
|
||||
template = "series.html"
|
||||
sort_by = "slug"
|
||||
transparent = true
|
||||
|
||||
[extra]
|
||||
series = true
|
||||
```
|
||||
|
||||
4. Crea els teus articles de la sèrie en aquest directori
|
||||
|
||||
Vols saber-ne més? Continua llegint!
|
||||
|
||||
## Com funcionen les sèries?
|
||||
|
||||
Una sèrie és simplement una secció que tabi gestiona de manera especial. Per a més detalls sobre seccions, consulta la [documentació de Zola](https://www.getzola.org/documentation/content/section/).
|
||||
|
||||
Prenent l'exemple del diagrama anterior, l'estructura de directoris seria així:
|
||||
|
||||
```txt
|
||||
content/
|
||||
_index.md
|
||||
blog/
|
||||
_index.md
|
||||
post1/
|
||||
index.md
|
||||
post2/
|
||||
index.md
|
||||
post4/
|
||||
index.md
|
||||
post6/
|
||||
index.md
|
||||
post7/
|
||||
index.md
|
||||
post9/
|
||||
index.md
|
||||
serie1/
|
||||
_index.md
|
||||
post3/
|
||||
index.md
|
||||
post5/
|
||||
index.md
|
||||
post8/
|
||||
index.md
|
||||
```
|
||||
|
||||
Per crear una sèrie, necessites:
|
||||
|
||||
1. Utilitzar la plantilla `series.html`
|
||||
2. Establir `series = true` a la configuració `[extra]` de la secció
|
||||
3. Activar `transparent = true` per integrar les publicacions de la sèrie amb la secció del blog principal
|
||||
|
||||
La pàgina principal de la sèrie mostra un resum seguit d'una llista de totes les publicacions a la sèrie:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/series_light.webp", dark_src="blog/series/img/series_dark.webp" alt="una sèrie", full_width=true) }}
|
||||
|
||||
## Saltar a les publicacions
|
||||
|
||||
Si el contingut d'una sèrie (el Markdown després del frontmatter a `_index.md`) supera els 2000 caràcters, apareix un enllaç "Salta a les publicacions" al costat del títol de la sèrie.
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enllaç per saltar a les publicacions de la sèrie", full_width=true) }}
|
||||
|
||||
Per forçar l'activació o desactivació d'aquesta funció, configura `show_jump_to_posts` a la secció `[extra]` de la teva secció de sèries o a `config.toml`. Aquesta configuració segueix [la jerarquia](@/blog/mastering-tabi-settings/index.ca.md#jerarquia-de-configuracio).
|
||||
|
||||
## Pàgines de sèries i ordre
|
||||
|
||||
Totes les pàgines a la secció de sèries seran pàgines de sèrie. Les pàgines s'ordenaran segons el `sort_by` de la secció.
|
||||
|
||||
Tot i que les sèries mantenen el seu propi ordre intern, romanen independents del flux cronològic de la secció principal (per exemple, `blog/`) gràcies a la configuració `transparent`.
|
||||
|
||||
### Opcions d'ordre
|
||||
|
||||
Tria entre aquests mètodes d'ordre, cadascun amb els seus avantatges:
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
`sort_by` | avantatges | desavantatges
|
||||
---------|------------|---------------
|
||||
`slug` | L'ordre de les pàgines és explícit a la ruta (per exemple, `example.com/blog/series1/01-series-post-un`). | Cada pàgina de la sèrie ha de tenir el prefix corresponent.
|
||||
`weight` | L'ordre de les pàgines és fàcil de configurar de forma transparent.<br>La primera publicació té pes `1`, la segona pes `2` i així successivament. | Cada pàgina de la sèrie ha de tenir el seu pes configurat.
|
||||
`date` | L'ordre de les pàgines es pot configurar una sola vegada a la configuració de la secció. No cal fer res a cada pàgina. | L'ordre de les pàgines s'ha d'invertir perquè la primera pàgina sol ser la més antiga. Això només es pot aconseguir paginant la secció (`paginate_by = 9999`) i invertint el seu ordre (`paginate_reversed = true`).
|
||||
|
||||
{% end %}
|
||||
|
||||
{{ admonition(type="danger", title="Versió de Zola per ordenar per data", text="Per invertir correctament les dates, es requereix Zola v0.19.3+ (no publicada) perquè la informació de paginació estigui disponible a través de la funció `get_section`. En cas contrari, qualsevol cosa que depengui de l'ordre de les pàgines de la sèrie no serà correcta (per exemple, pàgina anterior/següent, llistes ordenades i no ordenades...) Vegeu [Zola PR #2653](https://github.com/getzola/zola/pull/2653).") }}
|
||||
|
||||
### Indexació de pàgines
|
||||
|
||||
Les pàgines en una sèrie s'indexen començant des d'1, seguint el seu ordre `sort_by`. Per invertir la indexació (fent que la primera pàgina tingui l'índex més alt), afegeix aquesta configuració a `_index.md` o `config.toml`:
|
||||
|
||||
```toml
|
||||
[extra]
|
||||
post_listing_index_reversed = true # Per defecte és false si no es configura
|
||||
```
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/series_reversed_light.webp", dark_src="blog/series/img/series_reversed_dark.webp" alt="una sèrie amb índexs invertits", full_width=true) }}
|
||||
|
||||
Aquesta configuració segueix [la jerarquia](@/blog/mastering-tabi-settings/index.ca.md#jerarquia-de-configuracio).
|
||||
|
||||
## Plantilles d'introducció i conclusió
|
||||
|
||||
Els articles d'una sèrie poden tenir seccions automàtiques d'introducció i conclusió. Aquestes es configuren al `_index.md` de la teva sèrie. Un exemple bàsic:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = "Aquest article és part de la sèrie $SERIES_HTML_LINK."
|
||||
|
||||
[extra.series_outro_templates]
|
||||
default = "Gràcies per llegir la part $SERIES_PAGE_INDEX de $SERIES_HTML_LINK!"
|
||||
```
|
||||
|
||||
Les seccions d'introducció i conclusió tenen les seves pròpies classes CSS (`series-page-intro` i `series-page-outro`), que et permeten personalitzar la seva aparença mitjançant [CSS personalitzat](@/blog/mastering-tabi-settings/index.ca.md#estils-css-personalitzats).
|
||||
|
||||
### Tipus de plantilles
|
||||
|
||||
El sistema de sèries utilitza diferents plantilles segons la posició de l'article a la sèrie:
|
||||
|
||||
- `next_only` - Utilitzat per al primer article (té article següent però no anterior)
|
||||
- `middle` - Utilitzat per a articles amb articles anterior i següent
|
||||
- `prev_only` - Utilitzat per a l'últim article (té article anterior però no següent)
|
||||
- `default` - Plantilla per defecte utilitzada quan no existeix una plantilla específica per a la posició
|
||||
|
||||
El sistema determina automàticament quina plantilla utilitzar segons la posició de l'article. Les plantilles es defineixen a la configuració de la sèrie (`_index.md`), com `extra.series_intro_templates` i `extra.series_outro_templates`:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
next_only = "Benvingut a la part 1! Següent: $NEXT_HTML_LINK"
|
||||
middle = "Anterior: $PREV_HTML_LINK | Següent: $NEXT_HTML_LINK"
|
||||
prev_only = "El capítol final! Anteriorment: $PREV_HTML_LINK"
|
||||
default = "Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER"
|
||||
```
|
||||
|
||||
Totes les plantilles són opcionals. La selecció de plantilles segueix un sistema de prioritat:
|
||||
|
||||
1. Si existeix una plantilla específica per a la posició (`next_only`, `middle`, o `prev_only`), s'utilitzarà aquesta
|
||||
2. Si no, s'utilitza la plantilla `default`
|
||||
3. Si no es defineix cap plantilla, no es mostrarà informació de la sèrie
|
||||
|
||||
Mira l'[exemple de plantilla](#exemple-de-plantilla) per veure un exemple més elaborat.
|
||||
|
||||
### Ubicació al contingut
|
||||
|
||||
Per defecte:
|
||||
|
||||
- Les introduccions de sèrie apareixen a l'inici del teu article
|
||||
- La conclusió apareix al final (abans de les notes al peu, si n'hi ha)
|
||||
|
||||
Pots controlar exactament on apareixen utilitzant `<!-- series_intro -->` i `<!-- series_outro -->` al teu Markdown:
|
||||
|
||||
```markdown
|
||||
Aquest paràgraf apareix abans de la introducció de la sèrie.
|
||||
|
||||
<!-- series_intro -->
|
||||
|
||||
Contingut principal de l'article.
|
||||
|
||||
<!-- series_outro -->
|
||||
|
||||
## Recursos d'aprenentatge
|
||||
|
||||
Contingut addicional...
|
||||
|
||||
[^1]: Les notes al peu sempre apareixeran al final.
|
||||
```
|
||||
|
||||
## Variables
|
||||
|
||||
Les plantilles de sèries utilitzen un sistema flexible de variables que et permet:
|
||||
|
||||
1. Fer referència a informació de la sèrie (títol, enllaços)
|
||||
2. Afegir navegació entre articles
|
||||
3. Mostrar indicadors de progrés
|
||||
4. Incloure informació personalitzada utilitzant les teves pròpies variables
|
||||
|
||||
Les variables són marcadors que comencen amb `$` i es reemplacen amb contingut real quan es construeix el teu lloc. Per exemple, `$SERIES_HTML_LINK` es converteix en un enllaç clicable a la pàgina índex de la teva sèrie.
|
||||
|
||||
Hi ha tres tipus de variables:
|
||||
|
||||
- [Variables bàsiques de sèrie](#variables-basiques-de-serie): Informació general sobre la sèrie
|
||||
- [Variables de navegació](#variables-de-navegacio): Enllaços a articles anterior/següent
|
||||
- [Variables personalitzades](#variables-personalitzades): Els teus propis marcadors per a informació addicional
|
||||
|
||||
### Variables bàsiques de sèrie
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
| Variable | Disponibilitat | Retorna | Descripció | Exemple d'ús | Exemple de sortida |
|
||||
|----------|---------------|----------|------------|--------------|-------------------|
|
||||
| `$SERIES_TITLE` | Sempre | Text | Títol de la sèrie en text pla | `Part de $SERIES_TITLE` | Part d'Aprenent Rust |
|
||||
| `$SERIES_PERMALINK` | Sempre | Text | URL a l'índex de la sèrie | `[Veure totes les publicacions]($SERIES_PERMALINK)` | [Veure totes les publicacions](/series/learn-rust) |
|
||||
| `$SERIES_HTML_LINK` | Sempre | HTML | Enllaç llest per usar a la sèrie | `Benvingut a $SERIES_HTML_LINK!` | Benvingut a <a href="/series/learn-rust">Aprenent Rust</a>! |
|
||||
| `$SERIES_PAGES_NUMBER` | Sempre | Nombre | Total d'articles a la sèrie | `Una sèrie de $SERIES_PAGES_NUMBER parts` | Una sèrie de 5 parts |
|
||||
| `$SERIES_PAGE_INDEX` | Sempre | Nombre | Posició de l'article actual | `Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER` | Part 3 de 5 |
|
||||
| `$SERIES_PAGES_OLIST` | Sempre | HTML | Llista ordenada de tots els articles | `Articles a la sèrie: $SERIES_PAGES_OLIST` | Articles a la sèrie: <ol><li>Article actual</li><li><a href="...">Altres articles</a></li></ol> |
|
||||
| `$SERIES_PAGES_ULIST` | Sempre | HTML | Llista desordenada de tots els articles | `Articles a la sèrie: $SERIES_PAGES_ULIST` | Articles a la sèrie: <ul><li>Article actual</li><li><a href="...">Altres articles</a></li></ul> |
|
||||
|
||||
{% end %}
|
||||
|
||||
{{ admonition(type="tip", title="CONSELL: Text personalitzat amb permalinks", text='Els enllaços markdown com `[text]($SERIES_PERMALINK)` seran marcats (i [estilitzats](@/blog/mastering-tabi-settings/index.ca.md#indicador-d-enllacos-externs)) com externs. Si necessites text personalitzat i vols evitar l\'estil extern, utilitza HTML: `<a href=\"$SERIES_PERMALINK\">el teu text</a>`.') }}
|
||||
|
||||
### Variables de navegació
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
| Variable | Disponibilitat | Retorna | Descripció | Exemple d'ús | Exemple de sortida |
|
||||
|----------|---------------|----------|------------|--------------|-------------------|
|
||||
| `$PREV_TITLE` | Existeix anterior | Text | Títol de l'article anterior | `Anteriorment: $PREV_TITLE` | Anteriorment: Configurant el teu entorn |
|
||||
| `$PREV_PERMALINK` | Existeix anterior | Text | URL a l'article anterior | `[← Enrere]($PREV_PERMALINK)` | [← Enrere](/series/learn-rust/setup) |
|
||||
| `$PREV_HTML_LINK` | Existeix anterior | HTML | Enllaç llest per usar a l'anterior | `Llegeix primer $PREV_HTML_LINK` | Llegeix primer <a href="/series/learn-rust/setup">Configurant el teu entorn</a> |
|
||||
| `$PREV_DESCRIPTION` | Existeix anterior | Text | Descripció de l'article anterior | `Resum: $PREV_DESCRIPTION` | Resum: Configurant Rust |
|
||||
| `$NEXT_TITLE` | Existeix següent | Text | Títol del següent article | `Següent: $NEXT_TITLE` | Següent: Patrons avançats |
|
||||
| `$NEXT_PERMALINK` | Existeix següent | Text | URL al següent article | `[Continuar →]($NEXT_PERMALINK)` | [Continuar →](/series/learn-rust/patterns) |
|
||||
| `$NEXT_HTML_LINK` | Existeix següent | HTML | Enllaç llest per usar al següent | `Continua amb $NEXT_HTML_LINK` | Continua amb <a href="/series/learn-rust/patterns">Patrons avançats</a> |
|
||||
| `$NEXT_DESCRIPTION` | Existeix següent | Text | Descripció del següent article | `Properament: $NEXT_DESCRIPTION` | Properament: Aprèn sobre les característiques avançades de pattern matching en Rust |
|
||||
|
||||
{% end %}
|
||||
|
||||
### Referència al primer article
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
| Variable | Disponibilitat | Retorna | Descripció | Exemple d'ús | Exemple de sortida |
|
||||
|----------|---------------|----------|------------|--------------|-------------------|
|
||||
| `$FIRST_TITLE` | Sempre | Text | Títol del primer article | `Comença amb $FIRST_TITLE` | Comença amb Introducció a Rust |
|
||||
| `$FIRST_HTML_LINK` | Sempre | HTML | Enllaç llest per usar al primer article | `Comença a $FIRST_HTML_LINK` | Comença a <a href="/series/learn-rust/intro">Introducció a Rust</a> |
|
||||
|
||||
{% end %}
|
||||
|
||||
### Exemple de plantilla
|
||||
|
||||
{{ admonition(type="tip", title="Variables HTML vs text", text="Utilitza variables HTML (que acaben en `_HTML_LINK`) quan vulguis enllaços preparats per usar. Utilitza variables de text (que acaben en `_TITLE` o `_PERMALINK`) quan vulguis més control sobre el format.") }}
|
||||
|
||||
```toml,name=series/_index.md
|
||||
# Introducció
|
||||
[extra.series_intro_templates]
|
||||
next_only = """
|
||||
Benvingut a $SERIES_HTML_LINK! Aquesta sèrie de $SERIES_PAGES_NUMBER parts t'ensenyarà Rust des de zero.
|
||||
|
||||
Següent: $NEXT_HTML_LINK - $NEXT_DESCRIPTION
|
||||
"""
|
||||
|
||||
middle = """
|
||||
📚 Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER a $SERIES_HTML_LINK
|
||||
|
||||
Anterior: $PREV_HTML_LINK
|
||||
Següent: $NEXT_HTML_LINK
|
||||
"""
|
||||
|
||||
prev_only = """
|
||||
Benvingut a l'última part de $SERIES_HTML_LINK!
|
||||
Ets nou? Comença amb $FIRST_HTML_LINK per construir una base sòlida.
|
||||
|
||||
Anterior: $PREV_HTML_LINK
|
||||
"""
|
||||
|
||||
# Plantilla de respatller
|
||||
default = "Aquest article és part de la sèrie $SERIES_HTML_LINK."
|
||||
|
||||
# Conclusió
|
||||
[extra.series_outro_templates]
|
||||
next_only = """
|
||||
Gràcies per llegir! 🙌
|
||||
|
||||
Continua el teu viatge amb $NEXT_HTML_LINK, on $NEXT_DESCRIPTION
|
||||
O revisa l'esquema complet de la sèrie [$SERIES_TITLE]($SERIES_PERMALINK).
|
||||
"""
|
||||
|
||||
middle = """
|
||||
---
|
||||
📝 Navegació de la sèrie
|
||||
|
||||
- Anterior: $PREV_HTML_LINK
|
||||
- Següent: $NEXT_HTML_LINK
|
||||
- [Resum de la sèrie]($SERIES_PERMALINK)
|
||||
"""
|
||||
|
||||
prev_only = """
|
||||
🎉 Felicitats! Has completat $SERIES_HTML_LINK.
|
||||
|
||||
Vols repassar? Aquí vam començar: $FIRST_HTML_LINK
|
||||
O revisa el que acabem de veure a $PREV_HTML_LINK.
|
||||
"""
|
||||
|
||||
# Respatller.
|
||||
default = """
|
||||
---
|
||||
Aquest article és la part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER a $SERIES_HTML_LINK.
|
||||
"""
|
||||
```
|
||||
|
||||
### Variables personalitzades
|
||||
|
||||
Les plantilles de sèries admeten variables personalitzades per incloure informació addicional a tota la teva sèrie. El procés té dos passos:
|
||||
|
||||
1. Primer, defineix els teus **marcadors** a la configuració de la teva sèrie (`_index.md`):
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra]
|
||||
series = true
|
||||
series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"]
|
||||
```
|
||||
|
||||
2. Després, a cada article de la sèrie, proporciona els valors per a aquests marcadors a `series_template_variables`:
|
||||
|
||||
```toml,name=series/article.md
|
||||
[extra.series_template_variables]
|
||||
position = "primer"
|
||||
topic = "Variables i tipus"
|
||||
difficulty = "Principiant"
|
||||
```
|
||||
|
||||
### Ús de variables personalitzades
|
||||
|
||||
Pots usar les teves variables personalitzades a qualsevol plantilla, juntament amb les variables integrades:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = """
|
||||
Aquest és l'article $POSITION a $SERIES_HTML_LINK.
|
||||
Tema d'avui: $TOPIC
|
||||
Nivell de dificultat: $DIFFICULTY
|
||||
"""
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", text="Encara que els marcadors es defineixen en majúscules (`$POSITION`), els noms de variables a `series_template_variables` han d'estar en minúscules (`position`).") }}
|
||||
|
||||
### Exemple amb variables personalitzades
|
||||
|
||||
```toml,name=series/_index.md
|
||||
# A la configuració de la sèrie.
|
||||
[extra]
|
||||
series = true
|
||||
series_template_placeholders = ["$LEARNING_TIME", "$KEY_CONCEPTS"]
|
||||
|
||||
series_intro_templates.default = """
|
||||
📚 Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER
|
||||
⏱️ Temps estimat: $LEARNING_TIME
|
||||
🔑 Conceptes clau: $KEY_CONCEPTS
|
||||
"""
|
||||
```
|
||||
|
||||
```toml,name=series/02-learning-rust/index.md
|
||||
# En un article de la sèrie.
|
||||
[extra.series_template_variables]
|
||||
learning_time = "30 minuts"
|
||||
key_concepts = "Funcions, gestió d'errors, coincidència de patrons"
|
||||
```
|
||||
|
||||
Això generarà:
|
||||
|
||||
```txt
|
||||
📚 Part 2 de 5
|
||||
⏱️ Temps estimat: 30 minuts
|
||||
🔑 Conceptes clau: Funcions, gestió d'errors, coincidència de patrons
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", title="Variables que falten", text="Si uses un marcador a les teves plantilles però no proporciones el seu valor a `series_template_variables`, la compilació fallarà amb un error que llista les variables que falten.") }}
|
409
content/blog/series/index.es.md
Normal file
|
@ -0,0 +1,409 @@
|
|||
+++
|
||||
title = "Guía completa sobre series"
|
||||
date = 2024-11-08
|
||||
updated = 2025-02-15
|
||||
description = "Aprende a organizar tus publicaciones en series secuenciales, perfectas para tutoriales, cursos e historias de varias partes."
|
||||
|
||||
[taxonomies]
|
||||
tags = ["funcionalidad", "tutorial", "preguntas frecuentes", "series"]
|
||||
|
||||
[extra]
|
||||
quick_navigation_buttons = true
|
||||
toc = true
|
||||
mermaid = true
|
||||
social_media_card = "social_cards/es_blog_series.jpg"
|
||||
+++
|
||||
|
||||
Una serie organiza publicaciones relacionadas en orden secuencial, similar a los capítulos de un libro. A diferencia de las etiquetas, que simplemente agrupan contenido relacionado, las series sugieren un orden específico de lectura de principio a fin.
|
||||
|
||||
Las publicaciones dentro de una serie no necesitan publicarse de forma consecutiva; la función de series reúne publicaciones temáticamente vinculadas en una secuencia coherente.
|
||||
|
||||
El siguiente diagrama ilustra cómo las publicaciones de la serie (3, 5 y 8) existen dentro del flujo principal del blog mientras mantienen su propia secuencia ordenada dentro de Serie 1.
|
||||
|
||||
{% mermaid(full_width=true) %}
|
||||
flowchart
|
||||
subgraph main[BLOG]
|
||||
P1[Post 1]
|
||||
P2[P2]
|
||||
P3[P3]
|
||||
P4[P4]
|
||||
P5[P5]
|
||||
P6[P6]
|
||||
P7[P7]
|
||||
P8[P8]
|
||||
P9[P9]
|
||||
end
|
||||
subgraph series1[SERIE 1]
|
||||
PS1["Post Serie 1 (=P3)"]
|
||||
PS2["Post Serie 2 (=P5)"]
|
||||
PS3["Post Serie 3 (=P8)"]
|
||||
end
|
||||
P3 o-.-o PS1
|
||||
P5 o-.-o PS2
|
||||
P8 o-.-o PS3
|
||||
{% end %}
|
||||
|
||||
## Inicio rápido
|
||||
|
||||
1. Crea un directorio para tu serie
|
||||
2. Crea `_index.md` en el directorio de la serie
|
||||
3. Configura el front matter de `_index.md`:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
title = "Aprendiendo Rust"
|
||||
template = "series.html"
|
||||
sort_by = "slug"
|
||||
transparent = true
|
||||
|
||||
[extra]
|
||||
series = true
|
||||
```
|
||||
|
||||
4. Crea tus artículos de la serie en este directorio
|
||||
|
||||
¿Quieres saber más? ¡Sigue leyendo!
|
||||
|
||||
## ¿Cómo funcionan las series?
|
||||
|
||||
Una serie es simplemente una sección que tabi maneja de manera especial. Para más detalles sobre secciones, consulta la [documentación de Zola](https://www.getzola.org/documentation/content/section/).
|
||||
|
||||
Tomando el ejemplo del diagrama anterior, la estructura de directorios sería así:
|
||||
|
||||
```txt
|
||||
content/
|
||||
_index.md
|
||||
blog/
|
||||
_index.md
|
||||
post1/
|
||||
index.md
|
||||
post2/
|
||||
index.md
|
||||
post4/
|
||||
index.md
|
||||
post6/
|
||||
index.md
|
||||
post7/
|
||||
index.md
|
||||
post9/
|
||||
index.md
|
||||
serie1/
|
||||
_index.md
|
||||
post3/
|
||||
index.md
|
||||
post5/
|
||||
index.md
|
||||
post8/
|
||||
index.md
|
||||
```
|
||||
|
||||
Para crear una serie, necesitas:
|
||||
|
||||
1. Usar la plantilla `series.html`
|
||||
2. Establecer `series = true` en la configuración `[extra]` de la sección
|
||||
3. Activar `transparent = true` para integrar las publicaciones de la serie con la sección del blog principal
|
||||
|
||||
La página principal de la serie muestra un resumen seguido de una lista de todas las publicaciones en la serie:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/series_light.webp", dark_src="blog/series/img/series_dark.webp" alt="una serie", full_width=true) }}
|
||||
|
||||
## Saltar a las publicaciones
|
||||
|
||||
Si el contenido de una serie (el Markdown después del frontmatter en `_index.md`) supera los 2000 caracteres, aparece un enlace "Saltar a publicaciones" junto al título de la serie.
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enlace para saltar a las publicaciones de la serie", full_width=true) }}
|
||||
|
||||
Para forzar la activación o desactivación de esta función, configura `show_jump_to_posts` en la sección `[extra]` de tu sección de series o en `config.toml`. Esta configuración sigue [la jerarquía](@/blog/mastering-tabi-settings/index.es.md#jerarquia-de-configuracion).
|
||||
|
||||
## Páginas de series y orden
|
||||
|
||||
Todas las páginas en la sección de series serán páginas de serie. Las páginas se ordenarán según el `sort_by` de la sección.
|
||||
|
||||
Aunque las series mantienen su propio orden interno, permanecen independientes del flujo cronológico de la sección principal (por ejemplo, `blog/`) gracias a la configuración `transparent`.
|
||||
|
||||
### Opciones de orden
|
||||
|
||||
Elige entre estos métodos de orden, cada uno con sus ventajas:
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
`sort_by` | ventajas | desventajas
|
||||
---------|-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
`slug` | El orden de las páginas es explícito en la ruta (por ejemplo, `example.com/blog/series1/01-series-post-uno`). | Cada página de la serie debe tener el prefijo correspondiente.
|
||||
`weight` | El orden de las páginas es fácil de configurar de forma transparente.<br>La primera publicación tiene peso `1`, la segunda peso `2` y así sucesivamente. | Cada página de la serie debe tener su peso configurado.
|
||||
`date` | El orden de las páginas se puede configurar una sola vez en la configuración de la sección. No hay que hacer nada en cada página. | El orden de las páginas debe invertirse porque la primera página suele ser la más antigua. Esto solo se puede lograr paginando la sección (`paginate_by = 9999`) e invirtiendo su orden (`paginate_reversed = true`).
|
||||
|
||||
{% end %}
|
||||
|
||||
{{ admonition(type="danger", title="Versión de Zola para ordenar por fecha", text="Para invertir correctamente las fechas, se requiere Zola v0.19.3+ (no publicada) para que la información de paginación esté disponible a través de la función `get_section`. De lo contrario, cualquier cosa que dependa del orden de las páginas de la serie no será correcta (por ejemplo, página anterior/siguiente, listas ordenadas y no ordenadas...) Ver [Zola PR #2653](https://github.com/getzola/zola/pull/2653).") }}
|
||||
|
||||
### Indexación de páginas
|
||||
|
||||
Las páginas en una serie se indexan empezando desde 1, siguiendo su orden `sort_by`. Para invertir la indexación (haciendo que la primera página tenga el índice más alto), añade esta configuración a `_index.md` o `config.toml`:
|
||||
|
||||
```toml
|
||||
[extra]
|
||||
post_listing_index_reversed = true # Por defecto es false si no se configura
|
||||
```
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/series_reversed_light.webp", dark_src="blog/series/img/series_reversed_dark.webp" alt="una serie con índices invertidos", full_width=true) }}
|
||||
|
||||
Esta configuración sigue [la jerarquía](@/blog/mastering-tabi-settings/index.es.md#jerarquia-de-configuracion).
|
||||
|
||||
## Plantillas de introducción y conclusión
|
||||
|
||||
Los artículos de una serie pueden tener secciones automáticas de introducción y conclusión. Estas se configuran en el `_index.md` de tu serie. Un ejemplo básico:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = "Este artículo es parte de la serie $SERIES_HTML_LINK."
|
||||
|
||||
[extra.series_outro_templates]
|
||||
default = "¡Gracias por leer la parte $SERIES_PAGE_INDEX de $SERIES_HTML_LINK!"
|
||||
```
|
||||
|
||||
Las secciones de introducción y conclusión tienen sus propias clases CSS (`series-page-intro` y `series-page-outro`), lo que te permite personalizar su apariencia mediante [CSS personalizado](@/blog/mastering-tabi-settings/index.es.md#estilos-css-personalizados).
|
||||
|
||||
### Tipos de plantillas
|
||||
|
||||
El sistema de series usa diferentes plantillas según la posición del artículo en la serie:
|
||||
|
||||
- `next_only` - Usado para el primer artículo (tiene artículo siguiente pero no anterior)
|
||||
- `middle` - Usado para artículos con artículos anterior y siguiente
|
||||
- `prev_only` - Usado para el último artículo (tiene artículo anterior pero no siguiente)
|
||||
- `default` - Plantilla por defecto usada cuando no existe una plantilla específica para la posición
|
||||
|
||||
El sistema determina automáticamente qué plantilla usar según la posición del artículo. Las plantillas se definen en la configuración de la serie (`_index.md`), como `extra.series_intro_templates` y `extra.series_outro_templates`:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
next_only = "¡Bienvenido a la parte 1! Siguiente: $NEXT_HTML_LINK"
|
||||
middle = "Anterior: $PREV_HTML_LINK | Siguiente: $NEXT_HTML_LINK"
|
||||
prev_only = "¡El capítulo final! Anteriormente: $PREV_HTML_LINK"
|
||||
default = "Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER"
|
||||
```
|
||||
|
||||
Todas las plantillas son opcionales. La selección de plantillas sigue un sistema de prioridad:
|
||||
|
||||
1. Si existe una plantilla específica para la posición (`next_only`, `middle`, o `prev_only`), se usará esa
|
||||
2. Si no, se usa la plantilla `default`
|
||||
3. Si no se define ninguna plantilla, no se mostrará información de la serie
|
||||
|
||||
Mira el [ejemplo de plantilla](#ejemplo-de-plantilla) para ver un ejemplo más elaborado.
|
||||
|
||||
### Ubicación en el contenido
|
||||
|
||||
Por defecto:
|
||||
|
||||
- Las introducciones de serie aparecen al inicio de tu artículo
|
||||
- La conclusión aparece al final (antes de las notas al pie, si las hay)
|
||||
|
||||
Puedes controlar exactamente dónde aparecen usando `<!-- series_intro -->` y `<!-- series_outro -->` en tu Markdown:
|
||||
|
||||
```markdown
|
||||
Este párrafo aparece antes de la introducción de la serie.
|
||||
|
||||
<!-- series_intro -->
|
||||
|
||||
Contenido principal del artículo.
|
||||
|
||||
<!-- series_outro -->
|
||||
|
||||
## Recursos de aprendizaje
|
||||
|
||||
Contenido adicional...
|
||||
|
||||
[^1]: Las notas al pie siempre aparecerán al final.
|
||||
```
|
||||
|
||||
## Variables
|
||||
|
||||
Las plantillas de series usan un sistema flexible de variables que te permite:
|
||||
|
||||
1. Hacer referencia a información de la serie (título, enlaces)
|
||||
2. Añadir navegación entre artículos
|
||||
3. Mostrar indicadores de progreso
|
||||
4. Incluir información personalizada usando tus propias variables
|
||||
|
||||
Las variables son marcadores que comienzan con `$` y se reemplazan con contenido real cuando se construye tu sitio. Por ejemplo, `$SERIES_HTML_LINK` se convierte en un enlace clicable a la página índice de tu serie.
|
||||
|
||||
Hay tres tipos de variables:
|
||||
|
||||
- [Variables básicas de serie](#variables-basicas-de-serie): Información general sobre la serie
|
||||
- [Variables de navegación](#variables-de-navegacion): Enlaces a artículos anterior/siguiente
|
||||
- [Variables personalizadas](#variables-personalizadas): Tus propios marcadores para información adicional
|
||||
|
||||
### Variables básicas de serie
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
| Variable | Disponibilidad | Devuelve | Descripción | Ejemplo de uso | Ejemplo de salida |
|
||||
|----------|---------------|-----------|-------------|----------------|-------------------|
|
||||
| `$SERIES_TITLE` | Siempre | Texto | Título de la serie en texto plano | `Parte de $SERIES_TITLE` | Parte de Aprendiendo Rust |
|
||||
| `$SERIES_PERMALINK` | Siempre | Texto | URL al índice de la serie | `[Ver todas las publicaciones]($SERIES_PERMALINK)` | [Ver todas las publicaciones](/series/learn-rust) |
|
||||
| `$SERIES_HTML_LINK` | Siempre | HTML | Enlace listo para usar a la serie | `¡Bienvenido a $SERIES_HTML_LINK!` | ¡Bienvenido a <a href="/series/learn-rust">Aprendiendo Rust</a>! |
|
||||
| `$SERIES_PAGES_NUMBER` | Siempre | Número | Total de artículos en la serie | `Una serie de $SERIES_PAGES_NUMBER partes` | Una serie de 5 partes |
|
||||
| `$SERIES_PAGE_INDEX` | Siempre | Número | Posición del artículo actual | `Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER` | Parte 3 de 5 |
|
||||
| `$SERIES_PAGES_OLIST` | Siempre | HTML | Lista ordenada de todos los artículos | `Artículos en la serie: $SERIES_PAGES_OLIST` | Artículos en la serie: <ol><li>Artículo actual</li><li><a href="...">Otros artículos</a></li></ol> |
|
||||
| `$SERIES_PAGES_ULIST` | Siempre | HTML | Lista desordenada de todos los artículos | `Artículos en la serie: $SERIES_PAGES_ULIST` | Artículos en la serie: <ul><li>Artículo actual</li><li><a href="...">Otros artículos</a></li></ul> |
|
||||
|
||||
{% end %}
|
||||
|
||||
{{ admonition(type="tip", title="CONSEJO: Texto personalizado con permalinks", text='Los enlaces markdown como `[texto]($SERIES_PERMALINK)` serán marcados (y [estilizados](@/blog/mastering-tabi-settings/index.es.md#indicador-enlaces-externos)) como externos. Si necesitas texto personalizado y quieres evitar el estilo externo, usa HTML: `<a href=\"$SERIES_PERMALINK\">tu texto</a>`.') }}
|
||||
|
||||
### Variables de navegación
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
| Variable | Disponibilidad | Devuelve | Descripción | Ejemplo de uso | Ejemplo de salida |
|
||||
|----------|---------------|-----------|-------------|----------------|-------------------|
|
||||
| `$PREV_TITLE` | Existe anterior | Texto | Título del artículo anterior | `Anteriormente: $PREV_TITLE` | Anteriormente: Configurando tu entorno |
|
||||
| `$PREV_PERMALINK` | Existe anterior | Texto | URL al artículo anterior | `[← Atrás]($PREV_PERMALINK)` | [← Atrás](/series/learn-rust/setup) |
|
||||
| `$PREV_HTML_LINK` | Existe anterior | HTML | Enlace listo para usar al anterior | `Lee primero $PREV_HTML_LINK` | Lee primero <a href="/series/learn-rust/setup">Configurando tu entorno</a> |
|
||||
| `$PREV_DESCRIPTION` | Existe anterior | Texto | Descripción del artículo anterior | `Resumen: $PREV_DESCRIPTION` | Resumen: Configurando Rust |
|
||||
| `$NEXT_TITLE` | Existe siguiente | Texto | Título del siguiente artículo | `Siguiente: $NEXT_TITLE` | Siguiente: Patrones avanzados |
|
||||
| `$NEXT_PERMALINK` | Existe siguiente | Texto | URL al siguiente artículo | `[Continuar →]($NEXT_PERMALINK)` | [Continuar →](/series/learn-rust/patterns) |
|
||||
| `$NEXT_HTML_LINK` | Existe siguiente | HTML | Enlace listo para usar al siguiente | `Continúa con $NEXT_HTML_LINK` | Continúa con <a href="/series/learn-rust/patterns">Patrones avanzados</a> |
|
||||
| `$NEXT_DESCRIPTION` | Existe siguiente | Texto | Descripción del siguiente artículo | `Próximamente: $NEXT_DESCRIPTION` | Próximamente: Aprende sobre las características avanzadas de pattern matching en Rust |
|
||||
|
||||
{% end %}
|
||||
|
||||
### Referencia al primer artículo
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
| Variable | Disponibilidad | Devuelve | Descripción | Ejemplo de uso | Ejemplo de salida |
|
||||
|----------|---------------|-----------|-------------|----------------|-------------------|
|
||||
| `$FIRST_TITLE` | Siempre | Texto | Título del primer artículo | `Comienza con $FIRST_TITLE` | Comienza con Introducción a Rust |
|
||||
| `$FIRST_HTML_LINK` | Siempre | HTML | Enlace listo para usar al primer artículo | `Empieza en $FIRST_HTML_LINK` | Empieza en <a href="/series/learn-rust/intro">Introducción a Rust</a> |
|
||||
|
||||
{% end %}
|
||||
|
||||
### Ejemplo de plantilla
|
||||
|
||||
{{ admonition(type="tip", title="Variables HTML vs texto", text="Usa variables HTML (que terminan en `_HTML_LINK`) cuando quieras enlaces listos para usar. Usa variables de texto (que terminan en `_TITLE` o `_PERMALINK`) cuando quieras más control sobre el formato.") }}
|
||||
|
||||
```toml,name=series/_index.md
|
||||
# Introducción.
|
||||
[extra.series_intro_templates]
|
||||
next_only = """
|
||||
¡Bienvenido a $SERIES_HTML_LINK! Esta serie de $SERIES_PAGES_NUMBER partes te enseñará Rust desde cero.
|
||||
|
||||
Siguiente: $NEXT_HTML_LINK - $NEXT_DESCRIPTION
|
||||
"""
|
||||
|
||||
middle = """
|
||||
📚 Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER en $SERIES_HTML_LINK
|
||||
|
||||
Anterior: $PREV_HTML_LINK
|
||||
Siguiente: $NEXT_HTML_LINK
|
||||
"""
|
||||
|
||||
prev_only = """
|
||||
¡Bienvenido a la última parte de $SERIES_HTML_LINK!
|
||||
¿Eres nuevo? Comienza con $FIRST_HTML_LINK para construir una base sólida.
|
||||
|
||||
Anterior: $PREV_HTML_LINK
|
||||
"""
|
||||
|
||||
# Plantilla de respaldo.
|
||||
default = "Este artículo es parte de la serie $SERIES_HTML_LINK."
|
||||
|
||||
# Conclusión.
|
||||
[extra.series_outro_templates]
|
||||
next_only = """
|
||||
¡Gracias por leer! 🙌
|
||||
|
||||
Continúa tu viaje con $NEXT_HTML_LINK, donde $NEXT_DESCRIPTION
|
||||
O revisa el esquema completo de la serie [$SERIES_TITLE]($SERIES_PERMALINK).
|
||||
"""
|
||||
|
||||
middle = """
|
||||
---
|
||||
📝 Navegación de la serie
|
||||
|
||||
- Anterior: $PREV_HTML_LINK
|
||||
- Siguiente: $NEXT_HTML_LINK
|
||||
- [Resumen de la serie]($SERIES_PERMALINK)
|
||||
"""
|
||||
|
||||
prev_only = """
|
||||
🎉 ¡Felicidades! Has completado $SERIES_HTML_LINK.
|
||||
|
||||
¿Quieres repasar? Aquí comenzamos: $FIRST_HTML_LINK
|
||||
O revisa lo que acabamos de ver en $PREV_HTML_LINK.
|
||||
"""
|
||||
|
||||
# Respaldo.
|
||||
default = """
|
||||
---
|
||||
Este artículo es la parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER en $SERIES_HTML_LINK.
|
||||
"""
|
||||
```
|
||||
|
||||
### Variables personalizadas
|
||||
|
||||
Las plantillas de series admiten variables personalizadas para incluir información adicional en toda tu serie. El proceso tiene dos pasos:
|
||||
|
||||
1. Primero, define tus **marcadores** en la configuración de tu serie (`_index.md`):
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra]
|
||||
series = true
|
||||
series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"]
|
||||
```
|
||||
|
||||
2. Luego, en cada artículo de la serie, proporciona los valores para estos marcadores en `series_template_variables`:
|
||||
|
||||
```toml,name=series/article.md
|
||||
[extra.series_template_variables]
|
||||
position = "primero"
|
||||
topic = "Variables y tipos"
|
||||
difficulty = "Principiante"
|
||||
```
|
||||
|
||||
### Uso de variables personalizadas
|
||||
|
||||
Puedes usar tus variables personalizadas en cualquier plantilla, junto con las variables integradas:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = """
|
||||
Este es el artículo $POSITION en $SERIES_HTML_LINK.
|
||||
Tema de hoy: $TOPIC
|
||||
Nivel de dificultad: $DIFFICULTY
|
||||
"""
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", text="Aunque los marcadores se definen en mayúsculas (`$POSITION`), los nombres de variables en `series_template_variables` deben estar en minúsculas (`position`).") }}
|
||||
|
||||
### Ejemplo con variables personalizadas
|
||||
|
||||
```toml,name=series/_index.md
|
||||
# En la configuración de la serie.
|
||||
[extra]
|
||||
series = true
|
||||
series_template_placeholders = ["$LEARNING_TIME", "$KEY_CONCEPTS"]
|
||||
|
||||
series_intro_templates.default = """
|
||||
📚 Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER
|
||||
⏱️ Tiempo estimado: $LEARNING_TIME
|
||||
🔑 Conceptos clave: $KEY_CONCEPTS
|
||||
"""
|
||||
```
|
||||
|
||||
```toml,name=series/02-learning-rust/index.md
|
||||
# En un artículo de la serie.
|
||||
[extra.series_template_variables]
|
||||
learning_time = "30 minutos"
|
||||
key_concepts = "Funciones, manejo de errores, coincidencia de patrones"
|
||||
```
|
||||
|
||||
Esto generará:
|
||||
|
||||
```txt
|
||||
📚 Parte 2 de 5
|
||||
⏱️ Tiempo estimado: 30 minutos
|
||||
🔑 Conceptos clave: Funciones, manejo de errores, coincidencia de patrones
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", title="Variables faltantes", text="Si usas un marcador en tus plantillas pero no proporcionas su valor en `series_template_variables`, la compilación fallará con un error que lista las variables faltantes.") }}
|
409
content/blog/series/index.md
Normal file
|
@ -0,0 +1,409 @@
|
|||
+++
|
||||
title = "A Complete Guide to Series"
|
||||
date = 2024-11-08
|
||||
updated = 2025-02-15
|
||||
description = "Learn how to organize your posts into sequential series, perfect for tutorials, courses, and multi-part stories."
|
||||
|
||||
[taxonomies]
|
||||
tags = ["showcase", "tutorial", "FAQ", "series"]
|
||||
|
||||
[extra]
|
||||
quick_navigation_buttons = true
|
||||
toc = true
|
||||
mermaid = true
|
||||
social_media_card = "social_cards/es_blog_series.jpg"
|
||||
+++
|
||||
|
||||
A series organizes related posts in a sequential order, similar to chapters in a book. Unlike tags, which simply group related content, series suggest a specific reading order from start to finish.
|
||||
|
||||
Posts within a series do not need to be published consecutively; the series feature brings together thematically linked posts in a coherent sequence.
|
||||
|
||||
The diagram below illustrates how series posts (3, 5, and 8) exist within the main blog flow while maintaining their own ordered sequence within Series 1.
|
||||
|
||||
{% mermaid(full_width=true) %}
|
||||
flowchart
|
||||
subgraph main[BLOG]
|
||||
P1[Post 1]
|
||||
P2[P2]
|
||||
P3[P3]
|
||||
P4[P4]
|
||||
P5[P5]
|
||||
P6[P6]
|
||||
P7[P7]
|
||||
P8[P8]
|
||||
P9[P9]
|
||||
end
|
||||
subgraph series1[SERIES 1]
|
||||
PS1["Series Post 1 (=P3)"]
|
||||
PS2["Series Post 2 (=P5)"]
|
||||
PS3["Series Post 3 (=P8)"]
|
||||
end
|
||||
P3 o-.-o PS1
|
||||
P5 o-.-o PS2
|
||||
P8 o-.-o PS3
|
||||
{% end %}
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. Create a directory for your series.
|
||||
2. Create `_index.md` in the series directory.
|
||||
3. Set up the `_index.md` front matter:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
title = "Learning Rust"
|
||||
template = "series.html"
|
||||
sort_by = "slug"
|
||||
transparent = true
|
||||
|
||||
[extra]
|
||||
series = true
|
||||
```
|
||||
|
||||
4. Create your series articles in this directory.
|
||||
|
||||
Want more? Keep reading!
|
||||
|
||||
## How Do Series Work?
|
||||
|
||||
A series is just a section which is handled in a special way by tabi. For more details on sections, see the [Zola documentation](https://www.getzola.org/documentation/content/section/).
|
||||
|
||||
Taking the example from the diagram above, the directory structure would be as follow:
|
||||
|
||||
```txt
|
||||
content/
|
||||
_index.md
|
||||
blog/
|
||||
_index.md
|
||||
post1/
|
||||
index.md
|
||||
post2/
|
||||
index.md
|
||||
post4/
|
||||
index.md
|
||||
post6/
|
||||
index.md
|
||||
post7/
|
||||
index.md
|
||||
post9/
|
||||
index.md
|
||||
series1/
|
||||
_index.md
|
||||
post3/
|
||||
index.md
|
||||
post5/
|
||||
index.md
|
||||
post8/
|
||||
index.md
|
||||
```
|
||||
|
||||
To create a series, you need to:
|
||||
|
||||
1. Use the `series.html` template
|
||||
2. Set `series = true` in the section's `[extra]` configuration
|
||||
3. Enable `transparent = true` to integrate series posts with the parent blog section
|
||||
|
||||
The series main page displays an overview followed by a list of all posts in the series:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/series_light.webp", dark_src="blog/series/img/series_dark.webp" alt="a series", full_width=true) }}
|
||||
|
||||
## Jump to Posts
|
||||
|
||||
If the content of a series (the Markdown after the front matter in `_index.md`) is over 2000 characters, a "Jump to posts" link appears next to the series title.
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="jump to series posts link", full_width=true) }}
|
||||
|
||||
To force the feature on or off, set `show_jump_to_posts` in the `[extra]` section of your series section or in `config.toml`. This setting follows [the hierarchy](@/blog/mastering-tabi-settings/index.md#settings-hierarchy).
|
||||
|
||||
## Series Pages and Order
|
||||
|
||||
All pages in the series section will be a series page. The series pages will be ordered as per the series section `sort_by`.
|
||||
|
||||
While series maintain their own internal order, they remain independent from the main section's (e.g. `blog/`) chronological flow thanks to the `transparent` setting.
|
||||
|
||||
### Sorting Options
|
||||
|
||||
Choose from these sorting methods, each with its own advantages:
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
`sort_by` | pros | cons
|
||||
---------|-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
`slug` | The series pages order is made explicit in the path (e.g. `example.com/blog/series1/01-series-post-one`). | Each series page must be prefixed accordingly.
|
||||
`weight` | The series pages order is easy to set up transparently.<br>First series post has weight `1`, second series post has weight `2` and so on. | Each series page must have its weight set accordingly.
|
||||
`date` | The series pages order can be configured once in the series section configuration. No need to do anything on each series page. | The series pages order has to be reversed because the first page is usually the oldest. This can only be achieved by paginating the series section (`paginate_by = 9999`) and reversing its order (`paginate_reversed = true`).
|
||||
|
||||
{% end %}
|
||||
|
||||
{{ admonition(type="danger", title="Zola version to sort by date", text="In order to properly reverse dates, Zola v0.19.3+ (unreleased) is required so that pagination information is available through the `get_section` function. Anything relying on the series pages order won't be correct in a series page otherwise (e.g. previous/next series page, ordered and unordered list…) See [Zola PR #2653](https://github.com/getzola/zola/pull/2653).") }}
|
||||
|
||||
### Page Indexing
|
||||
|
||||
Pages in a series are indexed starting from 1, following their `sort_by` order. To reverse the indexing (making the first page have the highest index instead), add this setting to `_index.md` or `config.toml`:
|
||||
|
||||
```toml
|
||||
[extra]
|
||||
post_listing_index_reversed = true # Defaults to false if unset.
|
||||
```
|
||||
|
||||
{{ dual_theme_image(light_src="blog/series/img/series_reversed_light.webp", dark_src="blog/series/img/series_reversed_dark.webp" alt="a series with indexes reversed", full_width=true) }}
|
||||
|
||||
This setting follows [the hierarchy](@/blog/mastering-tabi-settings/index.md#settings-hierarchy).
|
||||
|
||||
## Intro and Outro Templates
|
||||
|
||||
Series articles can have automatic introduction and conclusion sections. These are configured in your series' `_index.md`. A basic example:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = "This article is part of the $SERIES_HTML_LINK series."
|
||||
|
||||
[extra.series_outro_templates]
|
||||
default = "Thanks for reading part $SERIES_PAGE_INDEX of $SERIES_HTML_LINK!"
|
||||
```
|
||||
|
||||
The intro and outro sections each have their own CSS classes (`series-page-intro` and `series-page-outro`), allowing you to customize their appearance through [custom CSS](@/blog/mastering-tabi-settings/index.md#custom-css).
|
||||
|
||||
### Template Types
|
||||
|
||||
The series system uses different templates based on an article's position in the series:
|
||||
|
||||
- `next_only` - Used for the first article (has next article but no previous)
|
||||
- `middle` - Used for articles with both previous and next articles
|
||||
- `prev_only` - Used for the last article (has previous article but no next)
|
||||
- `default` - Fallback template used when a specific position template isn't defined
|
||||
|
||||
The system automatically determines which template to use based on the article's position. The templates are defined in the series configuration (`_index.md`), as `extra.series_intro_templates` and `extra.series_outro_templates`.:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
next_only = "Welcome to part 1! Next up: $NEXT_HTML_LINK"
|
||||
middle = "Previous: $PREV_HTML_LINK | Next: $NEXT_HTML_LINK"
|
||||
prev_only = "The final chapter! Previously: $PREV_HTML_LINK"
|
||||
default = "Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER"
|
||||
```
|
||||
|
||||
All templates are optional. Template selection follows a priority system:
|
||||
|
||||
1. If a position-specific template exists (`next_only`, `middle`, or `prev_only`), it will be used
|
||||
2. Otherwise, the `default` template is used
|
||||
3. If no templates are defined at all, no series information will be displayed
|
||||
|
||||
See the [template example](#template-example) for a more elaborate example.
|
||||
|
||||
### Placement in Content
|
||||
|
||||
By default:
|
||||
|
||||
- Series introductions appear at the start of your article
|
||||
- Series outro appears at the end (before footnotes, if any)
|
||||
|
||||
You can control exactly where these appear using `<!-- series_intro -->` and `<!-- series_outro -->` in your Markdown:
|
||||
|
||||
```markdown
|
||||
This paragraph appears before the series introduction.
|
||||
|
||||
<!-- series_intro -->
|
||||
|
||||
Main content of the article.
|
||||
|
||||
<!-- series_outro -->
|
||||
|
||||
## Learning Resources
|
||||
|
||||
Extra content…
|
||||
|
||||
[^1]: Footnotes will always appear at the end.
|
||||
```
|
||||
|
||||
## Variables
|
||||
|
||||
Series templates use a flexible variable system that lets you:
|
||||
|
||||
1. Reference series information (title, links)
|
||||
2. Add navigation between articles
|
||||
3. Show progress indicators
|
||||
4. Include custom information using your own variables
|
||||
|
||||
Variables are placeholders starting with `$` that get replaced with actual content when your site builds. For example, `$SERIES_HTML_LINK` becomes a clickable link to your series index page.
|
||||
|
||||
There are three types of variables:
|
||||
|
||||
- [**Basic Series Variables**](#basic-series-variables): General information about the series
|
||||
- [**Navigation Variables**](#navigation-variables): Links to previous/next articles
|
||||
- [**Custom Variables**](#custom-variables): Your own placeholders for additional information
|
||||
|
||||
### Basic Series Variables
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
| Variable | Availability | Returns | Description | Example Usage | Example Output |
|
||||
|----------|-------------|---------|-------------|---------------|----------------|
|
||||
| `$SERIES_TITLE` | Always | Text | Plain text title of the series | `Part of $SERIES_TITLE` | Part of Learn Rust |
|
||||
| `$SERIES_PERMALINK` | Always | Text | URL to series index | `[See all posts]($SERIES_PERMALINK)` | [See all posts](/series/learn-rust) |
|
||||
| `$SERIES_HTML_LINK` | Always | HTML | Ready-to-use link to series | `Welcome to $SERIES_HTML_LINK!` | Welcome to <a href="/series/learn-rust">Learn Rust</a>! |
|
||||
| `$SERIES_PAGES_NUMBER` | Always | Number | Total articles in series | `A $SERIES_PAGES_NUMBER part series` | A 5 part series |
|
||||
| `$SERIES_PAGE_INDEX` | Always | Number | Current article's position | `Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER` | Part 3 of 5 |
|
||||
| `$SERIES_PAGES_OLIST` | Always | HTML | Ordered list of all articles | `Articles in series: $SERIES_PAGES_OLIST` | Articles in series: <ol><li>Current article</li><li><a href="...">Other articles</a></li></ol> |
|
||||
| `$SERIES_PAGES_ULIST` | Always | HTML | Unordered list of all articles | `Articles in series: $SERIES_PAGES_ULIST` | Articles in series: <ul><li>Current article</li><li><a href="...">Other articles</a></li></ul> |
|
||||
|
||||
{% end %}
|
||||
|
||||
{{ admonition(type="tip", title="TIP: Custom text with permalinks", text='Markdown links like `[text]($SERIES_PERMALINK)` will be marked (and [styled](@/blog/mastering-tabi-settings/index.md#external-link-indicator)) as external. If you need custom text and want to avoid external styling, use HTML: `<a href=\"$SERIES_PERMALINK\">your text</a>`.') }}
|
||||
|
||||
### Navigation Variables
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
| Variable | Availability | Returns | Description | Example Usage | Example Output |
|
||||
|----------|-------------|---------|-------------|---------------|----------------|
|
||||
| `$PREV_TITLE` | Previous exists | Text | Previous article's title | `Previously: $PREV_TITLE` | Previously: Setting Up Your Environment |
|
||||
| `$PREV_PERMALINK` | Previous exists | Text | URL to previous article | `[← Back]($PREV_PERMALINK)` | [← Back](/series/learn-rust/setup) |
|
||||
| `$PREV_HTML_LINK` | Previous exists | HTML | Ready-to-use link to previous | `Read $PREV_HTML_LINK first` | Read <a href="/series/learn-rust/setup">Setting Up Your Environment</a> first |
|
||||
| `$PREV_DESCRIPTION` | Previous exists | Text | Description of previous article | `Recap: $PREV_DESCRIPTION` | Recap: Setting up Rust |
|
||||
| `$NEXT_TITLE` | Next exists | Text | Next article's title | `Next up: $NEXT_TITLE` | Next up: Advanced Patterns |
|
||||
| `$NEXT_PERMALINK` | Next exists | Text | URL to next article | `[Continue →]($NEXT_PERMALINK)` | [Continue →](/series/learn-rust/patterns) |
|
||||
| `$NEXT_HTML_LINK` | Next exists | HTML | Ready-to-use link to next | `Continue with $NEXT_HTML_LINK` | Continue with <a href="/series/learn-rust/patterns">Advanced Patterns</a> |
|
||||
| `$NEXT_DESCRIPTION` | Next exists | Text | Description of next article | `Coming up: $NEXT_DESCRIPTION` | Coming up: Learn about Rust's advanced pattern matching features |
|
||||
|
||||
{% end %}
|
||||
|
||||
### First Article Reference
|
||||
|
||||
{% wide_container() %}
|
||||
|
||||
| Variable | Availability | Returns | Description | Example Usage | Example Output |
|
||||
|----------|-------------|---------|-------------|---------------|----------------|
|
||||
| `$FIRST_TITLE` | Always | Text | First article's title | `Start with $FIRST_TITLE` | Start with Introduction to Rust |
|
||||
| `$FIRST_HTML_LINK` | Always | HTML | Ready-to-use link to first article | `Begin at $FIRST_HTML_LINK` | Begin at <a href="/series/learn-rust/intro">Introduction to Rust</a> |
|
||||
|
||||
{% end %}
|
||||
|
||||
### Template Example
|
||||
|
||||
{{ admonition(type="tip", title="HTML vs text variables", text="Use HTML variables (ending in `_HTML_LINK`) when you want ready-made links. Use text variables (ending in `_TITLE` or `_PERMALINK`) when you want more control over the formatting.") }}
|
||||
|
||||
```toml,name=series/_index.md
|
||||
# Introduction.
|
||||
[extra.series_intro_templates]
|
||||
next_only = """
|
||||
Welcome to $SERIES_HTML_LINK! This $SERIES_PAGES_NUMBER-part series will teach you Rust from scratch.
|
||||
|
||||
Up next: $NEXT_HTML_LINK - $NEXT_DESCRIPTION
|
||||
"""
|
||||
|
||||
middle = """
|
||||
📚 Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER in $SERIES_HTML_LINK
|
||||
|
||||
Previously: $PREV_HTML_LINK
|
||||
Next up: $NEXT_HTML_LINK
|
||||
"""
|
||||
|
||||
prev_only = """
|
||||
Welcome to the final part of $SERIES_HTML_LINK!
|
||||
New here? Start with $FIRST_HTML_LINK to build a strong foundation.
|
||||
|
||||
Previously: $PREV_HTML_LINK
|
||||
"""
|
||||
|
||||
# Fallback template.
|
||||
default = "This article is part of the $SERIES_HTML_LINK series."
|
||||
|
||||
# Outro.
|
||||
[extra.series_outro_templates]
|
||||
next_only = """
|
||||
Thanks for reading! 🙌
|
||||
|
||||
Continue your journey with $NEXT_HTML_LINK, where $NEXT_DESCRIPTION
|
||||
Or check out the complete [$SERIES_TITLE]($SERIES_PERMALINK) series outline.
|
||||
"""
|
||||
|
||||
middle = """
|
||||
---
|
||||
📝 Series Navigation
|
||||
|
||||
- Previous: $PREV_HTML_LINK
|
||||
- Next: $NEXT_HTML_LINK
|
||||
- [Series Overview]($SERIES_PERMALINK)
|
||||
"""
|
||||
|
||||
prev_only = """
|
||||
🎉 Congratulations! You've completed $SERIES_HTML_LINK.
|
||||
|
||||
Want to review? Here's where we started: $FIRST_HTML_LINK
|
||||
Or check what we just covered in $PREV_HTML_LINK.
|
||||
"""
|
||||
|
||||
# Fallback.
|
||||
default = """
|
||||
---
|
||||
This article is part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER in $SERIES_HTML_LINK.
|
||||
"""
|
||||
```
|
||||
|
||||
### Custom Variables
|
||||
|
||||
Series templates support custom variables for additional information you want to include across your series. The process takes two steps:
|
||||
|
||||
1. First, define your **placeholders** in your series configuration (`_index.md`):
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra]
|
||||
series = true
|
||||
series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"]
|
||||
```
|
||||
|
||||
2. Then, in each series article, provide the values for these placeholders in `series_template_variables`:
|
||||
|
||||
```toml,name=series/article.md
|
||||
[extra.series_template_variables]
|
||||
position = "first"
|
||||
topic = "Variables and Types"
|
||||
difficulty = "Beginner"
|
||||
```
|
||||
|
||||
### Using Custom Variables
|
||||
|
||||
You can use your custom variables in any template, alongside the built-in variables:
|
||||
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = """
|
||||
This is the $POSITION article in $SERIES_HTML_LINK.
|
||||
Today's topic: $TOPIC
|
||||
Difficulty level: $DIFFICULTY
|
||||
"""
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", text="While placeholders are defined with uppercase (`$POSITION`), the variable names in `series_template_variables` must be lowercase (`position`).") }}
|
||||
|
||||
### Example with Custom Variables
|
||||
|
||||
```toml,name=series/_index.md
|
||||
# In the series configuration.
|
||||
[extra]
|
||||
series = true
|
||||
series_template_placeholders = ["$LEARNING_TIME", "$KEY_CONCEPTS"]
|
||||
|
||||
series_intro_templates.default = """
|
||||
📚 Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER
|
||||
⏱️ Estimated time: $LEARNING_TIME
|
||||
🔑 Key concepts: $KEY_CONCEPTS
|
||||
"""
|
||||
```
|
||||
|
||||
```toml,name=series/02-learning-rust/index.md
|
||||
# In an article of the series.
|
||||
[extra.series_template_variables]
|
||||
learning_time = "30 minutes"
|
||||
key_concepts = "Functions, Error Handling, Pattern Matching"
|
||||
```
|
||||
|
||||
This will output:
|
||||
|
||||
```txt
|
||||
📚 Part 2 of 5
|
||||
⏱️ Estimated time: 30 minutes
|
||||
🔑 Key concepts: Functions, Error Handling, Pattern Matching
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", title="Missing Variables", text="If you use a placeholder in your templates but don't provide its value in `series_template_variables`, the build will fail with an error listing the missing variables.") }}
|
BIN
content/blog/series/social_cards/blog_series.jpg
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
content/blog/series/social_cards/ca_blog_series.jpg
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
content/blog/series/social_cards/es_blog_series.jpg
Normal file
After Width: | Height: | Size: 53 KiB |
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Shortcodes personalitzats"
|
||||
date = 2023-02-19
|
||||
updated = 2024-08-28
|
||||
updated = 2025-02-15
|
||||
description = "Aquest tema inclou alguns shortcodes personalitzats útils que pots utilitzar per millorar les teves publicacions. Ja sigui per mostrar imatges que s'adapten als temes clar i fosc, o per donar format a una secció de referències amb un aspecte professional, aquests shortcodes personalitzats t'ajudaran."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -11,7 +11,7 @@ tags = ["funcionalitat", "shortcodes"]
|
|||
toc = true
|
||||
toc_levels = 2
|
||||
quick_navigation_buttons = true
|
||||
add_src_to_code_block = true
|
||||
code_block_name_links = true
|
||||
mermaid = true
|
||||
social_media_card = "social_cards/ca_blog_shortcodes.jpg"
|
||||
+++
|
||||
|
@ -28,7 +28,7 @@ Per incloure un diagrama Mermaid a la teva publicació, cal fer dues coses:
|
|||
|
||||
2. Utilitza el shortcode `mermaid()` per definir el teu diagrama. Per exemple:
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
{%/* mermaid() */%}
|
||||
classDiagram
|
||||
class DistorsionsCognitives {
|
||||
|
@ -91,12 +91,25 @@ El shortcode de Mermaid admet dos paràmetres:
|
|||
|
||||
{{ admonition(type="tip", title="CONSELL", text="Empra l'[editor de Mermaid](https://mermaid.live/) per crear i previsualitzar els teus diagrames.") }}
|
||||
|
||||
#### Ús
|
||||
|
||||
```
|
||||
{%/* mermaid(invertible=true, full_width=false) */%}
|
||||
|
||||
El teu codi Mermaid va aquí.
|
||||
|
||||
`invertible` or `full_width` poden ometre's per emprar els valors per defecte.
|
||||
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
## Shortcodes d'imatge
|
||||
|
||||
Tots els shortcodes d'imatge admeten rutes absolutes, rutes relatives, i fonts remotes en el paràmetre `src`.
|
||||
|
||||
Tots els shortcodes d'imatge tenen tres paràmetres opcionals:
|
||||
Tots els shortcodes d'imatge tenen els següents paràmetres opcionals:
|
||||
|
||||
- `raw_path`. Per defecte és `false`. Si es configura a `true`, el paràmetre `src` s'utilitzarà tal qual. Útil per a actius ubicats a la mateixa carpeta que tenen un slug personalitzat (vegeu [Zola issue #2598](https://github.com/getzola/zola/issues/2598)).
|
||||
- `inline`. Valor predeterminat: `false`. Si s'estableix a `true`, la imatge es mostrarà en línia amb el text.
|
||||
- `full_width`. Valor predeterminat: `false` (vegeu [a sota](#imatge-d-amplada-completa)).
|
||||
- `lazy_loading`. Valor predeterminat: `true`.
|
||||
|
@ -178,23 +191,55 @@ Tots els altres shortcodes d'imatges poden utilizar l'amplada completa assignant
|
|||
|
||||
### Mostrar ruta o URL
|
||||
|
||||
Mostra una ruta o URL al següent bloc de codi trobat. Si comença amb "http", es convertirà en un enllaç. Particularment útil quan s'utilitza en conjunció amb el [shortcode de text remot](#text-remot).
|
||||
Pots mostrar una ruta o URL per a un bloc de codi utilitzant la sintaxi nativa de Zola:
|
||||
|
||||
{{ admonition(type="warning", title="IMPORTANT", text="Aquesta funcionalitat requereix JavaScript. Per activar-la, configura `add_src_to_code_block = true` a la secció `[extra]` de la teva pàgina, secció, o `config.toml`.") }}
|
||||
{{ aside(text="Requereix Zola 0.20.0 o superior.") }}
|
||||
|
||||
{{ add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") }}
|
||||
````
|
||||
```rust,name=src/main.rs
|
||||
fn main() {
|
||||
println!("Hola, món!");
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
```.gitignore
|
||||
{{ remote_text(src="https://raw.githubusercontent.com/welpo/doteki/main/.gitignore") }}
|
||||
Això renderitza:
|
||||
|
||||
```rust,name=src/main.rs
|
||||
fn main() {
|
||||
println!("Hola, món!");
|
||||
}
|
||||
```
|
||||
|
||||
Si estableixes el `name` com una URL (és a dir, comença amb `http` o `https`), pots convertir-lo en un enllaç clicable. Això és particularment útil quan s'utilitza juntament amb el [shortcode de text remot](#text-remot).
|
||||
|
||||
{{ admonition(type="warning", title="JavaScript necessari", text="La funció d'URLs clicables requereix JavaScript. Per habilitar-la, configura `code_block_name_links = true` a la secció `[extra]` de la teva pàgina, secció, o `config.toml`.") }}
|
||||
|
||||
```.gitignore,name=https://github.com/welpo/doteki/blob/main/.gitignore
|
||||
__pycache__/
|
||||
*coverage*
|
||||
.vscode/
|
||||
dist/
|
||||
```
|
||||
|
||||
### Suport de shortcode heretat
|
||||
|
||||
El shortcode `add_src_to_code_block` segueix funcionant per retrocompatibilitat però serà descontinuat en una versió futura. Si us plau, utilitza la sintaxi nativa de Zola:
|
||||
|
||||
```
|
||||
# Forma antiga (descontinuada):
|
||||
{{/* add_src_to_code_block(src="ruta/al/fitxer.rs") */}}
|
||||
|
||||
# Forma nova (recomanada):
|
||||
```rust,name=ruta/al/fitxer.rs
|
||||
```
|
||||
|
||||
#### Ús
|
||||
|
||||
````
|
||||
{{/* add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") */}}
|
||||
|
||||
```.gitignore
|
||||
__pycache__/
|
||||
**pycache**/
|
||||
*coverage*
|
||||
.vscode/
|
||||
dist/
|
||||
|
@ -203,14 +248,54 @@ dist/
|
|||
|
||||
## Shortcodes de text
|
||||
|
||||
### Aside (nota al marge)
|
||||
|
||||
Afegeix contingut complementari als marges en pantalles amples, o com a blocs distintius en mòbil.
|
||||
|
||||
{{ aside(text="*Nota al marge* ve de *nota* (del llatí, 'marca' o 'senyal') i *marge* (del llatí *margo*, 'vora' o 'límit').") }}
|
||||
|
||||
El shortcode accepta dos paràmetres:
|
||||
|
||||
- `position`: Establir com a `"right"` per col·locar al marge dret (per defecte, esquerre)
|
||||
- El contingut es pot proporcionar mitjançant el paràmetre `text` o entre les etiquetes del shortcode
|
||||
|
||||
#### Ús
|
||||
|
||||
{{ admonition(type="warning", text="Separa la definició de la nota del shortcode amb dues línies en blanc per evitar errors de renderització.") }}
|
||||
|
||||
Fent servir el paràmetre `text`:
|
||||
|
||||
```
|
||||
{{/* aside(text="*Nota al marge* ve de *nota* (del llatí, 'marca' o 'senyal') i *marge* (del llatí *margo*, 'vora' o 'límit').") */}}
|
||||
```
|
||||
|
||||
Fent servir el cos del contingut i indicant la posició a la dreta:
|
||||
|
||||
```
|
||||
{%/* aside(position="right") */%}
|
||||
Una nota més llarga que
|
||||
pot ocupar diverses línies.
|
||||
|
||||
S'admet *Markdown*.
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
### Text remot
|
||||
|
||||
Afegeix text des d'una URL remota o un arxiu local.
|
||||
|
||||
El shortcode accepta tres paràmetres:
|
||||
|
||||
- `src`: L'URL d'origen o ruta del fitxer (obligatori)
|
||||
- `start`: Primera línia a mostrar (opcional, comença a 1)
|
||||
- `end`: Número de l'última línia (opcional, per defecte és 0, l'última línia)
|
||||
|
||||
{{ admonition(type="info", text="`start` i `end` són inclusius. `start=3, end=3` mostrarà només la tercera línia.") }}
|
||||
|
||||
**Important**:
|
||||
|
||||
- **Arxius remots VS arxius locals**: Si `src` comença amb "http", es tractarà com un arxiu remot. D'altra banda, s'assumeix que és una ruta d'arxiu local.
|
||||
- **Accés a arxius**: Atès que utilitza la funció [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data) de Zola, els arxius locals han d'estar dins del directori de Zola —vegeu la [lògica de cerca d'arxius](https://www.getzola.org/documentation/templates/overview/#file-searching-logic).
|
||||
- **Accés a arxius**: Atès que utilitza la funció [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data) de Zola, els arxius locals han d'estar dins del directori de Zola —vegeu la [lògica de cerca d'arxius](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). Desde [tabi 2.16.0](https://github.com/welpo/tabi/releases/tag/v2.16.0), el shortcode admet també rutes relatives.
|
||||
- **Formateig de blocs de codi**: Per mostrar el text com un bloc de codi, has d'afegir manualment les tanques de codi Markdown (cometes inverses) i, opcionalment, especificar el llenguatge de programació per al ressaltat sintàctic.
|
||||
|
||||
#### Ús
|
||||
|
@ -229,6 +314,12 @@ Mostra el text d'un arxiu local:
|
|||
{{/* remote_text(src="ruta/a/arxiu.txt") */}}
|
||||
```
|
||||
|
||||
Mostreu només les línies 3 a 5 d'un arxiu local:
|
||||
|
||||
```
|
||||
{{/* remote_text(src="ruta/a/arxiu.txt", start=3, end=5) */}}
|
||||
```
|
||||
|
||||
### Advertències
|
||||
|
||||
Destaca informació amb aquests shortcodes. Hi ha cinc tipus (`type`): `note`, `tip`, `info`, `warning`, i `danger`.
|
||||
|
@ -249,10 +340,26 @@ Pots canviar el `title` i la `icon` de l'advertència. Ambdós paràmetres accep
|
|||
|
||||
#### Ús
|
||||
|
||||
```
|
||||
Pots utilitzar les advertències de dues maneres:
|
||||
|
||||
1. En línia amb paràmetres:
|
||||
|
||||
```md
|
||||
{{/* admonition(type="danger", icon="tip", title="Un consell important", text="Mantingues-te hidratat") */}}
|
||||
```
|
||||
|
||||
2. Amb contingut al cos:
|
||||
|
||||
```md
|
||||
{%/* admonition(type="danger", icon="tip", title="Un consell important") */%}
|
||||
Mantingues-te hidratat
|
||||
|
||||
Aquest mètode és especialment útil per a contingut llarg o múltiples paràgrafs.
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
Ambdós mètodes admeten els mateixos paràmetres (`type`, `icon`, i `title`).
|
||||
|
||||
### Cites multillenguatge
|
||||
|
||||
Aquest shortcode permet mostrar una cita traduïda i en el llenguatge original:
|
||||
|
@ -336,3 +443,31 @@ El Markdown, per suposat, serà interpretat.
|
|||
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
### Forçar direcció del text
|
||||
|
||||
Força la direcció del text d'un bloc de contingut. Substitueix tant la configuració global `force_codeblock_ltr` com la direcció general del document.
|
||||
|
||||
Accepta el paràmetre `direction`: la direcció de text desitjada. Pot ser "ltr" (d'esquerra a dreta) o "rtl" (de dreta a esquerra). Per defecte és "ltr".
|
||||
|
||||
{% force_text_direction(direction="rtl") %}
|
||||
```python
|
||||
def مرحبا_بالعالم():
|
||||
print("مرحبا بالعالم!")
|
||||
```
|
||||
{% end %}
|
||||
|
||||
#### Ús
|
||||
|
||||
En una pàgina LTR podem forçar que un bloc de codi sigui RTL (com es mostra a dalt) de la següent manera:
|
||||
|
||||
````
|
||||
{%/* force_text_direction(direction="rtl") */%}
|
||||
|
||||
```python
|
||||
def مرحبا_بالعالم():
|
||||
print("مرحبا بالعالم!")
|
||||
```
|
||||
|
||||
{%/* end */%}
|
||||
````
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Shortcodes personalizados"
|
||||
date = 2023-02-19
|
||||
updated = 2024-08-28
|
||||
updated = 2025-02-15
|
||||
description = "Este tema incluye algunos shortcodes personalizados útiles que puedes utilizar para mejorar tus publicaciones. Puedes mostrar imágenes que se adapten a los temas claro y oscuro, dar formato a una sección de referencias con un aspecto profesional, y más."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -11,7 +11,7 @@ tags = ["funcionalidad", "shortcodes"]
|
|||
toc = true
|
||||
toc_levels = 2
|
||||
quick_navigation_buttons = true
|
||||
add_src_to_code_block = true
|
||||
code_block_name_links = true
|
||||
mermaid = true
|
||||
social_media_card = "social_cards/es_blog_shortcodes.jpg"
|
||||
+++
|
||||
|
@ -28,7 +28,7 @@ Para incluir un diagrama Mermaid en tu publicación, sigue estos dos pasos:
|
|||
|
||||
2. Usa el shortcode `mermaid()` para definir tu diagrama. Por ejemplo:
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
{%/* mermaid() */%}
|
||||
classDiagram
|
||||
class DistorsionesCognitivas {
|
||||
|
@ -91,12 +91,23 @@ El shortcode de Mermaid admite dos parámetros:
|
|||
|
||||
{{ admonition(type="tip", title="CONSEJO", text="Puedes usar el [editor de Mermaid](https://mermaid.live/) para crear y previsualizar tus diagramas.") }}
|
||||
|
||||
#### Uso
|
||||
|
||||
```
|
||||
{%/* mermaid(invertible=true, full_width=false) */%}
|
||||
|
||||
Tu diagrama Mermaid va aquí. Puedes omitir los parámetros para usar los valores predeterminados.
|
||||
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
## Shortcodes de imagen
|
||||
|
||||
Todos los shortcodes de imagen admiten rutas absolutas, rutas relativas, y fuentes remotas en el parámetro `src`.
|
||||
|
||||
Todos los shortcodes de imagen tienen tres parámetros opcionales:
|
||||
Todos los shortcodes de imagen tienen los siguientes parámetros opcionales:
|
||||
|
||||
- `raw_path`. Por defecto es `false`. Si se establece en `true`, el parámetro `src` se usará tal cual. Útil para activos ubicados en la misma carpeta que tienen un slug personalizado (ver [Zola issue #2598](https://github.com/getzola/zola/issues/2598)).
|
||||
- `inline`. Valor predeterminado: `false`. Si se establece `true`, la imagen se mostrará en línea con el texto.
|
||||
- `full_width`. Valor predeterminado: `false` (ver [más abajo](#imagen-a-ancho-completo)).
|
||||
- `lazy_loading`. Valor predeterminado: `true`.
|
||||
|
@ -179,39 +190,99 @@ Todos los otros shortcodes de imágenes pueden usar el ancho completo asignando
|
|||
|
||||
### Mostrar ruta o URL
|
||||
|
||||
Muestra una ruta o URL en el siguiente bloque de código encontrado. Si comienza con "http", se convertirá en un enlace. Particularmente útil cuando se usa junto con el [shortcode de texto remot](#texto-remoto).
|
||||
Puedes mostrar una ruta o URL para un bloque de código usando la sintaxis nativa de Zola:
|
||||
|
||||
{{ add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") }}
|
||||
|
||||
```.gitignore
|
||||
{{ remote_text(src="https://raw.githubusercontent.com/welpo/doteki/main/.gitignore") }}
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", title="IMPORTANT", text="Esta característica requiere JavaScript. Para habilitarla, configura `add_src_to_code_block = true` en la sección `[extra]` de tu página, sección, o `config.toml`.") }}
|
||||
|
||||
#### Uso
|
||||
{{ aside(text="Requiere Zola 0.20.0 o superior.") }}
|
||||
|
||||
````
|
||||
{{/* add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") */}}
|
||||
```rust,name=src/main.rs
|
||||
fn main() {
|
||||
println!("¡Hola, mundo!");
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
```.gitignore
|
||||
Esto renderiza:
|
||||
|
||||
```rust,name=src/main.rs
|
||||
fn main() {
|
||||
println!("¡Hola, mundo!");
|
||||
}
|
||||
```
|
||||
|
||||
Si estableces el `name` como una URL (es decir, comienza con `http` o `https`), puedes convertirlo en un enlace clickable. Esto es particularmente útil cuando se usa junto con el [shortcode de texto remoto](#texto-remoto).
|
||||
|
||||
{{ admonition(type="warning", title="JavaScript requerido", text="La función de URLs clickables requiere JavaScript. Para habilitarla, configura `code_block_name_links = true` en la sección `[extra]` de tu página, sección, o `config.toml`.") }}
|
||||
|
||||
```.gitignore,name=https://github.com/welpo/doteki/blob/main/.gitignore
|
||||
__pycache__/
|
||||
*coverage*
|
||||
.vscode/
|
||||
dist/
|
||||
```
|
||||
````
|
||||
|
||||
### Soporte de shortcode heredado
|
||||
|
||||
El shortcode `add_src_to_code_block` sigue funcionando por retrocompatibilidad, pero será descontinuado en una versión futura. Por favor, usa la sintaxis nativa de Zola:
|
||||
|
||||
```
|
||||
# Forma antigua (descontinuada):
|
||||
{{/* add_src_to_code_block(src="ruta/al/archivo.rs") */}}
|
||||
|
||||
# Forma nueva (recomendada):
|
||||
```rust,name=ruta/al/archivo.rs
|
||||
```
|
||||
|
||||
## Shortcodes de texto
|
||||
|
||||
### Aside (nota al margen)
|
||||
|
||||
Añade contenido complementario en los márgenes en pantallas anchas, o como bloques distintivos en móvil.
|
||||
|
||||
{{ aside(text="*Nota al margen* viene de *nota* (del latín, 'marca' o 'señal') y *margen* (del latín *margo*, 'borde' o 'límite').") }}
|
||||
|
||||
El shortcode acepta dos parámetros:
|
||||
|
||||
- `position`: Establecer como `"right"` para colocar en el margen derecho (por defecto, izquierdo)
|
||||
- El contenido puede proporcionarse mediante el parámetro `text` o entre las etiquetas del shortcode
|
||||
|
||||
#### Uso
|
||||
|
||||
{{ admonition(type="warning", text="Separa la llamada al shortcode con saltos de línea para evitar errores de renderizado.") }}
|
||||
|
||||
Usando el parámetro `text`:
|
||||
|
||||
```
|
||||
{{/* aside(text="*Nota al margen* viene de *nota* (del latín, 'marca' o 'señal') y *margen* (del latín *margo*, 'borde' o 'límite').") */}}
|
||||
```
|
||||
|
||||
Usando el cuerpo del contenido e indicando la posición:
|
||||
|
||||
```
|
||||
{%/* aside(position="right") */%}
|
||||
Una nota más larga que
|
||||
puede ocupar varias líneas.
|
||||
|
||||
Se admite *Markdown*.
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
### Texto remoto
|
||||
|
||||
Añade texto desde una URL remota o un archivo local.
|
||||
|
||||
El shortcode acepta tres parámetros:
|
||||
|
||||
- `src`: La URL de origen o ruta del archivo (obligatorio)
|
||||
- `start`: Primera línea a mostrar (opcional, empieza en 1)
|
||||
- `end`: Número de la última línea (opcional, por defecto es 0, la última línea)
|
||||
|
||||
{{ admonition(type="info", text="`start` y `end` son inclusivos. `start=3, end=3` mostrará solo la tercera línea.") }}
|
||||
|
||||
**Importante**:
|
||||
|
||||
- **Archivos remotos VS archivos locales**: Si `src` empieza con "http", se tratará como un archivo remoto. De lo contrario, se asume que es una ruta de archivo local.
|
||||
- **Acceso a archivos**: Dado que utiliza la función [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data) de Zola, los archivos locales deben estar dentro del directorio de Zola —ver la [lógica de búsqueda de archivos](https://www.getzola.org/documentation/templates/overview/#file-searching-logic).
|
||||
- **Acceso a archivos**: Dado que utiliza la función [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data) de Zola, los archivos locales deben estar dentro del directorio de Zola —ver la [lógica de búsqueda de archivos](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). Desde [tabi 2.16.0](https://github.com/welpo/tabi/releases/tag/v2.16.0), el shortcode admite también rutas relativas.
|
||||
- **Formateo de bloques de código**: Para mostrar el texto como un bloque de código, debes añadir manualmente las cercas de código Markdown (comillas invertidas) y, opcionalmente, especificar el lenguaje de programación para el resaltado sintáctico.
|
||||
|
||||
#### Uso
|
||||
|
@ -230,6 +301,12 @@ Visualización de texto de un archivo local:
|
|||
{{/* remote_text(src="ruta/a/archivo.txt") */}}
|
||||
```
|
||||
|
||||
Mostar sólo las líneas 3 a 5 de un archivo remoto:
|
||||
|
||||
```
|
||||
{{/* remote_text(src="https://example.com/script.py", start=3, end=5) */}}
|
||||
```
|
||||
|
||||
### Advertencias
|
||||
|
||||
Destaca información con estos shortcodes. Hay cinco tipos (`type`): `note`, `tip`, `info`, `warning`, y `danger`.
|
||||
|
@ -250,10 +327,26 @@ Puedes cambiar el `title` y el `icon` de la advertencia. Ambos parámetros acept
|
|||
|
||||
#### Uso
|
||||
|
||||
```
|
||||
Puedes usar las advertencias de dos formas:
|
||||
|
||||
1. En línea con parámetros:
|
||||
|
||||
```md
|
||||
{{/* admonition(type="danger", icon="tip", title="Un consejo importante", text="Mantente hidratado") */}}
|
||||
```
|
||||
|
||||
2. Con contenido en el cuerpo:
|
||||
|
||||
```md
|
||||
{%/* admonition(type="danger", icon="tip", title="Un consejo importante") */%}
|
||||
Mantente hidratado
|
||||
|
||||
Este método es especialmente útil para contenido largo o múltiples párrafos.
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
Ambos métodos admiten los mismos parámetros (`type`, `icon`, y `title`).
|
||||
|
||||
### Citas multilenguaje
|
||||
|
||||
Este shortcode permite mostrar una cita traducida y en su lenguaje original:
|
||||
|
@ -338,3 +431,31 @@ El Markdown, por supuesto, será interpretado.
|
|||
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
### Forzar dirección del texto
|
||||
|
||||
Fuerza la dirección del texto de un bloque de contenido. Anula tanto la configuración global `force_codeblock_ltr` como la dirección general del documento.
|
||||
|
||||
Acepta el parámetro `direction`: la dirección de texto deseada. Puede ser "ltr" (de izquierda a derecha) o "rtl" (de derecha a izquierda). Por defecto es "ltr".
|
||||
|
||||
{% force_text_direction(direction="rtl") %}
|
||||
```python
|
||||
def مرحبا_بالعالم():
|
||||
print("مرحبا بالعالم!")
|
||||
```
|
||||
{% end %}
|
||||
|
||||
#### Uso
|
||||
|
||||
En una página LTR podemos forzar que un bloque de código sea RTL (como se muestra arriba) de la siguiente manera:
|
||||
|
||||
````
|
||||
{%/* force_text_direction(direction="rtl") */%}
|
||||
|
||||
```python
|
||||
def مرحبا_بالعالم():
|
||||
print("مرحبا بالعالم!")
|
||||
```
|
||||
|
||||
{%/* end */%}
|
||||
````
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Custom shortcodes"
|
||||
date = 2023-02-19
|
||||
updated = 2024-08-28
|
||||
updated = 2025-02-15
|
||||
description = "This theme includes some useful custom shortcodes that you can use to enhance your posts. Whether you want to display images that adapt to light and dark themes, or format a professional-looking reference section, these custom shortcodes have got you covered."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -11,7 +11,7 @@ tags = ["showcase", "shortcodes"]
|
|||
toc = true
|
||||
toc_levels = 2
|
||||
quick_navigation_buttons = true
|
||||
add_src_to_code_block = true
|
||||
code_block_name_links = true
|
||||
mermaid = true
|
||||
social_media_card = "social_cards/blog_shortcodes.jpg"
|
||||
+++
|
||||
|
@ -28,7 +28,7 @@ To include a Mermaid diagram in your post, there are two steps:
|
|||
|
||||
2. Use the `mermaid()` shortcode to define your diagram in your posts. For example:
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
{%/* mermaid() */%}
|
||||
classDiagram
|
||||
class CognitiveDistortions {
|
||||
|
@ -91,12 +91,25 @@ The Mermaid shortcode supports two parameters:
|
|||
|
||||
{{ admonition(type="tip", text="You can use the [Mermaid Live Editor](https://mermaid.live/) to create and preview your diagrams.") }}
|
||||
|
||||
#### Usage
|
||||
|
||||
```
|
||||
{%/* mermaid(invertible=true, full_width=false) */%}
|
||||
|
||||
Your diagram goes here.
|
||||
|
||||
`invertible` or `full_width` can be omitted if default values are used.
|
||||
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
## Image shortcodes
|
||||
|
||||
All image shortcodes support absolute paths, relative paths, and remote sources in the `src` parameter.
|
||||
|
||||
All image shortcodes have three optional parameters:
|
||||
All image shortcodes have these optional parameters:
|
||||
|
||||
- `raw_path`. Defaults to `false`. If set to `true`, the `src` parameter will be used as is. Useful for colocated assets with a custom slug (see [Zola issue #2598](https://github.com/getzola/zola/issues/2598)).
|
||||
- `inline`. Defaults to `false`. If set to `true`, the image will be displayed inline with the text.
|
||||
- `full_width`. Defaults to `false` (see [below](#full-width-image))
|
||||
- `lazy_loading`. Defaults to `true`.
|
||||
|
@ -178,39 +191,99 @@ All other image shortcodes can be made into full-width by setting the optional p
|
|||
|
||||
### Show source or path
|
||||
|
||||
Display a path or URL on the next code block found. If it starts with "http", it will become a link. Particularly useful when used in conjunction with the [remote text shortcode](#remote-text).
|
||||
You can display a path or URL for a code block using Zola's native syntax:
|
||||
|
||||
{{ add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") }}
|
||||
|
||||
```.gitignore
|
||||
{{ remote_text(src="https://raw.githubusercontent.com/welpo/doteki/main/.gitignore") }}
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", title="IMPORTANT", text="This feature requires JavaScript. To enable it, set `add_src_to_code_block = true` on the `[extra]` section of your page, section, or `config.toml`.") }}
|
||||
|
||||
#### Usage
|
||||
{{ aside(text="Requires Zola 0.20.0 or later.") }}
|
||||
|
||||
````
|
||||
{{/* add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") */}}
|
||||
```rust,name=src/main.rs
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
```.gitignore
|
||||
This renders:
|
||||
|
||||
```rust,name=src/main.rs
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
```
|
||||
|
||||
If you set the `name` to a URL (i.e. it starts with `http` or `https`), you can turn it into a clickable link. This is particularly useful when used in conjunction with the [remote text shortcode](#remote-text).
|
||||
|
||||
{{ admonition(type="warning", title="JavaScript required", text="The clickable URL feature requires JavaScript. To enable it, set `code_block_name_links = true` on the `[extra]` section of your page, section, or `config.toml`.") }}
|
||||
|
||||
```.gitignore,name=https://github.com/welpo/doteki/blob/main/.gitignore
|
||||
__pycache__/
|
||||
*coverage*
|
||||
.vscode/
|
||||
dist/
|
||||
```
|
||||
````
|
||||
|
||||
### Legacy shortcode support
|
||||
|
||||
The `add_src_to_code_block` shortcode is still supported for backward compatibility but will be deprecated in a future release. Please use Zola's native syntax shown above instead:
|
||||
|
||||
```
|
||||
# Old way (deprecated):
|
||||
{{/* add_src_to_code_block(src="path/to/file.rs") */}}
|
||||
|
||||
# New way (preferred):
|
||||
```rust,name=path/to/file.rs
|
||||
```
|
||||
|
||||
## Text shortcodes
|
||||
|
||||
### Aside (side/margin note)
|
||||
|
||||
Add supplementary content in the margins on wide screens, or as distinct blocks on mobile.
|
||||
|
||||
{{ aside(text="*Sidenote* comes from Latin *nota* ('mark') + Old English *síde* ('side').") }}
|
||||
|
||||
The shortcode accepts two parameters:
|
||||
|
||||
- `position`: Set to `"right"` to place in right margin (defaults to left)
|
||||
- Content can be provided via `text` parameter or between shortcode tags
|
||||
|
||||
#### Usage
|
||||
|
||||
{{ admonition(type="warning", text="Place the aside shortcode on its own line to prevent formatting issues.") }}
|
||||
|
||||
Using the `text` parameter:
|
||||
|
||||
```
|
||||
{{/* aside(text="*Sidenote* comes from Latin *nota* ('mark') + Old English *síde* ('side').") */}}
|
||||
```
|
||||
|
||||
Using the content body and setting the position to right:
|
||||
|
||||
```
|
||||
{%/* aside(position="right") */%}
|
||||
A longer note that
|
||||
can span multiple lines.
|
||||
|
||||
*Markdown* is supported.
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
### Remote text
|
||||
|
||||
Embed text from a remote URL or a local file. To display the path or URL on the code block, see the [show source or path shortcode](#show-source-or-path).
|
||||
|
||||
The shortcode accepts three parameters:
|
||||
|
||||
- `src`: The source URL or file path (required)
|
||||
- `start`: First line to display (optional, starts at 1)
|
||||
- `end`: The ending line number (optional, defaults to 0, meaning the last line)
|
||||
|
||||
{{ admonition(type="info", text="`start` and `end` are inclusive. `start=3, end=3` will display only the third line.") }}
|
||||
|
||||
**Important**:
|
||||
|
||||
- **Remote VS local files**: If `src` starts with "http", it will be treated as a remote file. Otherwise, it assumes a local file path.
|
||||
- **Files access**: As it uses Zola's [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data), local files must be inside the Zola directory—see [File searching logic](https://www.getzola.org/documentation/templates/overview/#file-searching-logic).
|
||||
- **Files access**: As it uses Zola's [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data), local files must be inside the Zola directory—see [File searching logic](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). As of [tabi 2.16.0](https://github.com/welpo/tabi/releases/tag/v2.16.0), the shortcode supports both relative and absolute paths.
|
||||
- **Code block formatting**: To display the text as a code block, you must manually add the Markdown code fences (backticks) and, optionally, specify the programming language for syntax highlighting.
|
||||
|
||||
#### Usage
|
||||
|
@ -229,6 +302,12 @@ Displaying text from a local file:
|
|||
{{/* remote_text(src="path/to/file.txt") */}}
|
||||
```
|
||||
|
||||
Display lines 3 to 7 (both inclusive) of a local file:
|
||||
|
||||
```
|
||||
{{/* remote_text(src="path/to/file.txt", start=3, end=7) */}}
|
||||
```
|
||||
|
||||
### Admonitions
|
||||
|
||||
Bring attention to information with these admonition shortcodes. They come in five `type`s: `note`, `tip`, `info`, `warning`, and `danger`.
|
||||
|
@ -249,10 +328,26 @@ You can change the `title` and `icon` of the admonition. Both parameters take a
|
|||
|
||||
#### Usage
|
||||
|
||||
```
|
||||
You can use admonitions in two ways:
|
||||
|
||||
1. Inline with parameters:
|
||||
|
||||
```md
|
||||
{{/* admonition(type="danger", icon="tip", title="An important tip", text="Stay hydrated~") */}}
|
||||
```
|
||||
|
||||
2. With a content body:
|
||||
|
||||
```md
|
||||
{%/* admonition(type="danger", icon="tip", title="An important tip") */%}
|
||||
Stay hydrated~
|
||||
|
||||
This method is particularly useful for longer content or multiple paragraphs.
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
Both methods support the same parameters (`type`, `icon`, and `title`), with the content either passed as the `text` parameter or as the body between tags.
|
||||
|
||||
### Multilingual quotes
|
||||
|
||||
This shortcode allows you to display both the translated and original text for a quote. The quotation marks will be added automatically:
|
||||
|
@ -336,3 +431,31 @@ Markdown will of course be rendered.
|
|||
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
### Force text direction
|
||||
|
||||
Force the text direction of a content block. Overrides both the global `force_codeblock_ltr` setting and the document's overall direction.
|
||||
|
||||
Accepts the parameter `direction`: the desired text direction. This can be either "ltr" (left-to-right) or "rtl" (right-to-left). Defaults to "ltr".
|
||||
|
||||
{% force_text_direction(direction="rtl") %}
|
||||
```python
|
||||
def مرحبا_بالعالم():
|
||||
print("مرحبا بالعالم!")
|
||||
```
|
||||
{% end %}
|
||||
|
||||
#### Usage
|
||||
|
||||
In a LTR page we can force a code block to be RTL (as shown above) like so:
|
||||
|
||||
````
|
||||
{%/* force_text_direction(direction="rtl") */%}
|
||||
|
||||
```python
|
||||
def مرحبا_بالعالم():
|
||||
print("مرحبا بالعالم!")
|
||||
```
|
||||
|
||||
{%/* end */%}
|
||||
````
|
||||
|
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
@ -5,7 +5,6 @@ path = "/ca/about"
|
|||
|
||||
[extra]
|
||||
quick_navigation_buttons = true
|
||||
social_media_card = "social_cards/about.ca.jpg"
|
||||
+++
|
||||
|
||||
Benvingut a la demo de [**tabi**](https://github.com/welpo/tabi), un tema per a [Zola](https://www.getzola.org/), un generador de llocs web estàtics rapidíssim.
|
||||
|
|
|
@ -5,7 +5,6 @@ path = "/es/about"
|
|||
|
||||
[extra]
|
||||
quick_navigation_buttons = true
|
||||
social_media_card = "social_cards/about.es.jpg"
|
||||
+++
|
||||
|
||||
Bienvenido a la demo de [**tabi**](https://github.com/welpo/tabi), un tema para [Zola](https://www.getzola.org/), un rapidísimo generador de sitios estáticos.
|
||||
|
|
|
@ -5,7 +5,6 @@ path = "about"
|
|||
|
||||
[extra]
|
||||
quick_navigation_buttons = true
|
||||
social_media_card = "social_cards/about.jpg"
|
||||
+++
|
||||
|
||||
Welcome to the demo of [**tabi**](https://github.com/welpo/tabi), a theme for [Zola](https://www.getzola.org/), a fast static site generator.
|
||||
|
|
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 71 KiB |
|
@ -5,7 +5,7 @@ template = "cards.html"
|
|||
insert_anchor_links = "left"
|
||||
|
||||
[extra]
|
||||
social_media_card = "projects/social_cards/ca_projects.jpg"
|
||||
social_media_card = "projects/ca_projects.jpg"
|
||||
show_reading_time = false
|
||||
quick_navigation_buttons = true
|
||||
+++
|
||||
|
|
|
@ -5,7 +5,7 @@ template = "cards.html"
|
|||
insert_anchor_links = "left"
|
||||
|
||||
[extra]
|
||||
social_media_card = "projects/social_cards/es_projects.jpg"
|
||||
social_media_card = "projects/es_projects.jpg"
|
||||
show_reading_time = false
|
||||
quick_navigation_buttons = true
|
||||
+++
|
||||
|
|
|
@ -5,7 +5,7 @@ template = "cards.html"
|
|||
insert_anchor_links = "left"
|
||||
|
||||
[extra]
|
||||
social_media_card = "projects/social_cards/projects.jpg"
|
||||
social_media_card = "projects/projects.jpg"
|
||||
show_reading_time = false
|
||||
quick_navigation_buttons = true
|
||||
+++
|
||||
|
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
|
@ -3,33 +3,58 @@ title = "dōteki"
|
|||
description = "Afegeix contingut dinàmic al teu perfil de GitHub amb un sistema intuïtiu de plugins."
|
||||
weight = 30
|
||||
|
||||
[taxonomies]
|
||||
tags = ["GitHub Actions", "automatització", "Python"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/doteki/doteki_logo.webp"
|
||||
social_media_card = "social_cards/projects_doteki.jpg"
|
||||
canonical_url = "https://osc.garden/ca/projects/doteki/"
|
||||
+++
|
||||
|
||||
[**dōteki**](https://doteki.org/) és una eina dissenyada per donar vida als perfils de GitHub afegint contingut dinàmic de manera senzilla. Amb un arxiu de configuració TOML intuïtiu i un sistema de plugins versàtil, **dōteki** permet als usuaris mostrar contingut recent i automatitzat directament als seus perfils de GitHub.
|
||||
**dōteki** actualitza el teu perfil de GitHub automàticament. Afegeix les teves últimes publicacions del blog, la música que escoltes o qualsevol altre contingut dinàmic mitjançant plugins.
|
||||
|
||||

|
||||
|
||||
#### [GitHub](https://github.com/welpo/doteki) • [Lloc web](https://doteki.org/) • [Documentació](https://doteki.org/docs/) {.centered-text}
|
||||
|
||||
## Per què dōteki?
|
||||
## Com funciona
|
||||
|
||||
**dōteki** destaca per la seva simplicitat i potència. És altament personalitzable i extensible, i està dissenyat per ser fàcil de configurar i utilitzar.
|
||||
1. Afegeix marcadors al teu README:
|
||||
|
||||
## Característiques clau
|
||||
```md,name=README.md
|
||||
<!-- blog start -->
|
||||
<!-- blog end -->
|
||||
```
|
||||
|
||||
- **Plug-and-Play**: Afegeix marcadors al teu README i utilitza un arxiu TOML per incorporar seccions de contingut dinàmic al teu perfil de GitHub.
|
||||
- **Sistema de plugins extensible**: Des de mostrar les últimes publicacions del teu blog fins a compartir la música que has estat escoltant, el sistema de plugins permet infinites possibilitats. No trobes un plugin que s'ajusti a les teves necessitats? [Crea el teu propi](https://doteki.org/docs/developer-guide/plugin-standard)!
|
||||
- [**Documentació exhaustiva**](https://doteki.org/docs/) amb informació detallada sobre com configurar i utilitzar **dōteki** i els seus plugins. Inclou [instruccions clares per als desenvolupadors](https://doteki.org/docs/developer-guide/) que vulguin contribuir al projecte.
|
||||
- **Preparat per a l'automatització**: Utilitza l'[Acció de GitHub](https://github.com/welpo/doteki-action) per mantenir el teu perfil sempre actualitzat.
|
||||
2. Configura què hi va:
|
||||
|
||||
## Refresca el teu perfil de GitHub
|
||||
```toml,name=doteki.toml
|
||||
[sections.blog]
|
||||
plugin = "feed"
|
||||
url = "https://osc.garden/atom.xml" # Substitueix amb el teu feed.
|
||||
|
||||
Aprofita les capacitats dinàmiques de **dōteki** i transforma el teu perfil de GitHub en un aparador del teu treball més recent, pensaments i interessos.
|
||||
[sections.last_updated]
|
||||
plugin = "current_date"
|
||||
inline = true
|
||||
```
|
||||
|
||||
[Configura **dōteki** en menys de 5 minuts](https://doteki.org/) i dóna vida al teu perfil de GitHub.
|
||||
3. Configura l'[Acció de GitHub](https://github.com/welpo/doteki-action).
|
||||
|
||||
[](https://doteki.org/)
|
||||
Això és tot! El teu README s'actualitzarà automàticament.
|
||||
|
||||
## Característiques
|
||||
|
||||
- **Sistema de plugins**: Mostra [entrades del blog](https://doteki.org/docs/plugins/feed), [música](https://doteki.org/docs/plugins/lastfm), o [crea el teu propi plugin](https://doteki.org/docs/developer-guide/plugin-standard)
|
||||
- **Configuració simple**: Un arxiu TOML, una Acció de GitHub
|
||||
- **Flexible**: Cada plugin té les seves pròpies opcions (ordre, entrades màximes, format…)
|
||||
- **[Documentació detallada](https://doteki.org/docs/)**: Informació detallada sobre com configurar i utilitzar **dōteki** i els seus plugins. Inclou [instruccions clares per als desenvolupadors](https://doteki.org/docs/developer-guide/) que vulguin contribuir.
|
||||
|
||||
## Documentació
|
||||
|
||||
Consulta la [documentació](https://doteki.org/docs/) per a:
|
||||
|
||||
- [Guia d'inici](https://doteki.org/docs/)
|
||||
- [Plugins disponibles](https://doteki.org/docs/category/plugins)
|
||||
- [Desenvolupament de plugins](https://doteki.org/docs/developer-guide/)
|
||||
- [Opcions de configuració](https://doteki.org/docs/configuration/)
|
||||
|
|
|
@ -3,33 +3,58 @@ title = "dōteki"
|
|||
description = "Añade contenido dinámico a tu perfil de GitHub con un sistema intuitivo de plugins."
|
||||
weight = 30
|
||||
|
||||
[taxonomies]
|
||||
tags = ["GitHub Actions", "automatización", "Python"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/doteki/doteki_logo.webp"
|
||||
social_media_card = "social_cards/projects_doteki.jpg"
|
||||
canonical_url = "https://osc.garden/es/projects/doteki/"
|
||||
+++
|
||||
|
||||
[**dōteki**](https://doteki.org/) es una herramienta diseñada para dar vida a los perfiles de GitHub añadiendo contenido dinámico de manera sencilla. Con un archivo de configuración TOML intuitivo y un versátil sistema de plugins, **dōteki** permite a los usuarios mostrar contenido reciente y automatizado directamente en sus perfiles de GitHub.
|
||||
**dōteki** actualiza tu perfil de GitHub automáticamente. Añade tus últimas publicaciones del blog, la música que escuchas o cualquier otro contenido dinámico mediante plugins.
|
||||
|
||||

|
||||
|
||||
#### [GitHub](https://github.com/welpo/doteki) • [Sitio web](https://doteki.org/) • [Documentación](https://doteki.org/docs/) {.centered-text}
|
||||
|
||||
## ¿Por qué dōteki?
|
||||
## Cómo funciona
|
||||
|
||||
**dōteki** destaca por su simplicidad y potencia. Permite mostrar tu trabajo, intereses y personalidad en tu perfil de GitHub, siempre al día. Es altamente personalizable y extensible, y está diseñado para ser fácil de configurar y usar.
|
||||
1. Añade marcadores a tu README:
|
||||
|
||||
## Características clave
|
||||
```md,name=README.md
|
||||
<!-- blog start -->
|
||||
<!-- blog end -->
|
||||
```
|
||||
|
||||
- **Plug-and-Play**: Añade marcadores a tu README y utiliza un archivo TOML para incorporar secciones de contenido dinámico en tu perfil de GitHub.
|
||||
- **Sistema de plugins extensible**: Desde mostrar las últimas publicaciones de tu blog hasta compartir la música que has estado escuchando, el sistema de plugins permite infinitas posibilidades. ¿No encuentras un plugin que se ajuste a tus necesidades? ¡[Crea tu propio plugin](https://doteki.org/docs/developer-guide/plugin-standard)!
|
||||
- [**Documentación exhaustiva**](https://doteki.org/docs/) con información detallada sobre cómo configurar y usar **dōteki** y sus plugins. Incluye [instrucciones claras para los desarrolladores](https://doteki.org/docs/developer-guide/) que quieran contribuir al proyecto
|
||||
- **Listo para la automatización**: Utiliza la [Acción de GitHub](https://github.com/welpo/doteki-action) para mantener tu perfil siempre actualizado.
|
||||
2. Configura qué va ahí:
|
||||
|
||||
## Refresca tu perfil de GitHub
|
||||
```toml,name=doteki.toml
|
||||
[sections.blog]
|
||||
plugin = "feed"
|
||||
url = "https://osc.garden/atom.xml" # Reemplaza con tu feed.
|
||||
|
||||
Aprovecha las capacidades dinámicas de **dōteki** y transforma tu perfil de GitHub en un escaparate de tu trabajo más reciente, pensamientos e intereses.
|
||||
[sections.last_updated]
|
||||
plugin = "current_date"
|
||||
inline = true
|
||||
```
|
||||
|
||||
[Configura **dōteki** en menos de 5 minutos](https://doteki.org/) y da vida a tu perfil de GitHub.
|
||||
3. Configura la [Acción de GitHub](https://github.com/welpo/doteki-action).
|
||||
|
||||
[](https://doteki.org/)
|
||||
¡Eso es todo! Tu README se actualizará automáticamente.
|
||||
|
||||
## Características
|
||||
|
||||
- **Sistema de plugins**: Muestra [entradas del blog](https://doteki.org/docs/plugins/feed), [música](https://doteki.org/docs/plugins/lastfm), o [crea tu propio plugin](https://doteki.org/docs/developer-guide/plugin-standard)
|
||||
- **Configuración simple**: Un archivo TOML, una Acción de GitHub
|
||||
- **Flexible**: Cada plugin tiene sus propias opciones (orden, entradas máximas, formato…)
|
||||
- **[Documentación detallada](https://doteki.org/docs/)**: Información detallada sobre cómo configurar y usar **dōteki** y sus plugins. Incluye [instrucciones claras para los desarrolladores](https://doteki.org/docs/developer-guide/) que quieran contribuir.
|
||||
|
||||
## Documentación
|
||||
|
||||
Consulta la [documentación](https://doteki.org/docs/) para:
|
||||
|
||||
- [Guía de inicio rápido](https://doteki.org/docs/)
|
||||
- [Plugins disponibles](https://doteki.org/docs/category/plugins)
|
||||
- [Desarrollo de plugins](https://doteki.org/docs/developer-guide/)
|
||||
- [Opciones de configuración](https://doteki.org/docs/configuration/)
|
||||
|
|
|
@ -3,33 +3,58 @@ title = "dōteki"
|
|||
description = "Add dynamic content to your GitHub profile through an intuitive plugin system."
|
||||
weight = 30
|
||||
|
||||
[taxonomies]
|
||||
tags = ["GitHub Actions", "automation", "Python"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/doteki/doteki_logo.webp"
|
||||
social_media_card = "social_cards/projects_doteki.jpg"
|
||||
canonical_url = "https://osc.garden/projects/doteki/"
|
||||
+++
|
||||
|
||||
[**dōteki**](https://doteki.org/) is a tool designed to breathe life into GitHub profiles by adding dynamic content effortlessly. By leveraging an intuitive TOML configuration file along with a versatile plugin system, **dōteki** empowers users to showcase fresh, automated content directly on their GitHub profiles.
|
||||
**dōteki** updates your GitHub profile README automatically. Add your latest blog posts, music you're listening to, or any other dynamic content using plugins.
|
||||
|
||||

|
||||
|
||||
#### [GitHub](https://github.com/welpo/doteki) • [Website](https://doteki.org/) • [Documentation](https://doteki.org/docs/) {.centered-text}
|
||||
|
||||
## Why dōteki?
|
||||
## How it works
|
||||
|
||||
**dōteki** stands out for its simplicity and power, enabling you to dynamically showcase your work, interests and personality on your GitHub profile. It's designed to be easy to set up and use, while also being highly customizable and extensible.
|
||||
1. Add markers to your README:
|
||||
|
||||
## Key Features
|
||||
```md,name=README.md
|
||||
<!-- blog start -->
|
||||
<!-- blog end -->
|
||||
```
|
||||
|
||||
- **Plug-and-Play**: Add markers to your README and use a TOML file for straightforward setup and easy management of dynamic content sections on your GitHub profile README.
|
||||
- **Extensible plugin system**: From showcasing your latest blog posts to displaying your favourite music, the plugin system allows for endless possibilities. Can't find a plugin that suits your needs? [Create your own](https://doteki.org/docs/developer-guide/plugin-standard)!
|
||||
- **Extensive documentation**: The [comprehensive documentation](https://doteki.org/docs/) provides detailed information on how to set up and use **dōteki** and its plugins. It includes [clear instructions for developers](https://doteki.org/docs/developer-guide/) looking to contribute.
|
||||
- **Automation Ready**: Use the [GitHub Action](https://github.com/welpo/doteki-action) to keep your profile always up to date.
|
||||
2. Configure what goes there:
|
||||
|
||||
## Enhance Your GitHub Profile Today
|
||||
```toml,name=doteki.toml
|
||||
[sections.blog]
|
||||
plugin = "feed"
|
||||
url = "https://osc.garden/atom.xml" # Replace with your feed.
|
||||
|
||||
Embrace the dynamic capabilities of **dōteki** and transform your GitHub profile into a vibrant showcase of your latest work, thoughts, and interests.
|
||||
[sections.last_updated]
|
||||
plugin = "current_date"
|
||||
inline = true
|
||||
```
|
||||
|
||||
[Set up **dōteki** in less than 5 minutes](https://doteki.org/) and bring your GitHub profile to life.
|
||||
3. Set up the [GitHub Action](https://github.com/welpo/doteki-action).
|
||||
|
||||
[](https://doteki.org/)
|
||||
That's it! Your README will stay updated automatically.
|
||||
|
||||
## Features
|
||||
|
||||
- **Plugin system**: Show [blog posts](https://doteki.org/docs/plugins/feed), [music](https://doteki.org/docs/plugins/lastfm), or [build your own plugin](https://doteki.org/docs/developer-guide/plugin-standard)
|
||||
- **Simple setup**: One TOML file, one GitHub Action
|
||||
- **Flexible**: Each plugin has its own options (sort order, max entries, format…)
|
||||
- **[Extensive documentation](https://doteki.org/docs/)**: Detailed information on how to set up and use **dōteki** and its plugins. It includes [clear instructions for developers](https://doteki.org/docs/developer-guide/) looking to contribute.
|
||||
|
||||
## Documentation
|
||||
|
||||
Check the [docs](https://doteki.org/docs/) for:
|
||||
|
||||
- [Getting started guide](https://doteki.org/docs/)
|
||||
- [Available plugins](https://doteki.org/docs/category/plugins)
|
||||
- [Plugin development](https://doteki.org/docs/developer-guide/)
|
||||
- [Configuration options](https://doteki.org/docs/configuration/)
|
||||
|
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 141 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 22 KiB |
|
@ -3,13 +3,16 @@ title = "git-sumi"
|
|||
description = "El linter de missatges de commit no opinat basat en Rust."
|
||||
weight = 10
|
||||
|
||||
[taxonomies]
|
||||
tags = ["Git", "Rust", "Continuous Integration", "GitHub Actions", "CLI", "automatització"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/git-sumi/git-sumi_logo.webp"
|
||||
social_media_card = "social_cards/projects_git-sumi.jpg"
|
||||
canonical_url = "https://osc.garden/ca/projects/git-sumi/"
|
||||
+++
|
||||
|
||||
**git-sumi** és un linter de missatges de commit no opinat escrit en Rust. És una eina flexible per complir els teus estàndards de missatges de commit, facilitant missatges consistents i fàcilment automatitzables.
|
||||
**git-sumi** és el linter de missatges de commit no opinat escrit en Rust.
|
||||
|
||||
{% wide_container() %}
|
||||
<video controls src="https://cdn.jsdelivr.net/gh/welpo/git-sumi@main/assets/git-sumi_demo.mp4" title="demo de git-sumi"></video>
|
||||
|
@ -19,21 +22,12 @@ canonical_url = "https://osc.garden/ca/projects/git-sumi/"
|
|||
|
||||
## Característiques principals
|
||||
|
||||
- **Regles personalitzables**: Configura git-**sumi** per satisfer els requisits específics de cada projecte. Configura regles per a Conventional Commits, límits de longitud, ús de Gitmoji i més a través d'un senzill arxiu de configuració TOML.
|
||||
- **Informe d'errors clar**: Proporciona un informe d'errors detallat, fent que la correcció sigui senzilla i educativa.
|
||||
- **Integració sense fissures**: Sent un únic binari, git-**sumi** s'integra fàcilment en el teu flux de treball. Fins i tot pots utilitzar l'[Acció de GitHub](https://github.com/welpo/git-sumi-action) per validar els teus commits (o títols de PR) sense necessitat d'instal·lar res localment.
|
||||
- **Regles personalitzables**: Configura regles per a Conventional Commits, límits de longitud, ús de [Gitmoji](https://gitmoji.dev/) i [més](https://sumi.rs/docs/rules).
|
||||
- **Informe d'errors clar**: Proporciona errors detallats, fent que la correcció sigui senzilla i educativa.
|
||||
- **Integració senzilla**: Com a binari únic, git-sumi s'integra fàcilment al teu flux de treball. També pots fer servir l'[Acció de GitHub](https://github.com/welpo/git-sumi-action) per validar commits (o títols de PR) sense instal·lar res.
|
||||
|
||||
## Bones pràctiques de desenvolupament
|
||||
|
||||
- **Ampla cobertura del codi**: Més del 95% de cobertura de línies i una cobertura de característiques exhaustiva garanteixen la robustesa de git-**sumi**.
|
||||
- **Integració [contínua](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) i [publicació](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml)**: Fluxos de treball automatitzats per provar, integrar i publicar asseguren que cada versió de git-**sumi** estigui completament provada i llesta per al seu ús.
|
||||
- **Contribucions de la comunitat**: Fomenta les contribucions de la comunitat de tot tipus, amb un enfocament acollidor tant per als nouvinguts com per als desenvolupadors experimentats.
|
||||
- [**Documentació exhaustiva**](https://sumi.rs/docs/) per començar amb git-**sumi** i comprendre les seves característiques i capacitats.
|
||||
|
||||
## Comença a millorar les teves pràctiques de commit avui
|
||||
|
||||
Fes el primer pas cap a la transformació de les teves pràctiques de commit. La combinació de flexibilitat, retroalimentació detallada i fàcil integració de git-**sumi** el converteix en l'opció perfecta per a equips i individus que busquen millorar els seus missatges de commit.
|
||||
|
||||
[Descobreix **git-sumi**](https://sumi.rs/) i fes-lo part del teu kit d'eines de desenvolupament.
|
||||
|
||||
[](https://sumi.rs/)
|
||||
- **Cobertura de codi**: 98% de cobertura en tests; un linter ha de ser fiable.
|
||||
- **[Integració](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) i [publicació](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml) contínua**: Fluxos automatitzats per a testing i publicació de binaris multiplataforma a crates.io, PyPI i GitHub releases.
|
||||
- **Documentació**: [Documentació completa](https://sumi.rs/docs/) amb [guia ràpida](https://sumi.rs/docs/), [exemples](https://sumi.rs/docs/examples), [regles](https://sumi.rs/docs/rules), [integració](https://sumi.rs/docs/integration), [FAQ](https://sumi.rs/docs/faq)...
|
||||
|
|
|
@ -3,13 +3,16 @@ title = "git-sumi"
|
|||
description = "El linter de mensajes de commit no opinado basado en Rust."
|
||||
weight = 10
|
||||
|
||||
[taxonomies]
|
||||
tags = ["Git", "Rust", "Continuous Integration", "GitHub Actions", "CLI", "automatización"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/git-sumi/git-sumi_logo.webp"
|
||||
social_media_card = "social_cards/projects_git-sumi.jpg"
|
||||
canonical_url = "https://osc.garden/es/projects/git-sumi/"
|
||||
+++
|
||||
|
||||
**git-sumi** es un linter de mensajes de commit no opinado escrito en Rust. Es una herramienta flexible para cumplir tus estándares de mensajes de commit, facilitando mensajes consistentes y fácilmente automatizables.
|
||||
**git-sumi** es el linter de mensajes de commit no opinado escrito en Rust.
|
||||
|
||||
{% wide_container() %}
|
||||
<video controls src="https://cdn.jsdelivr.net/gh/welpo/git-sumi@main/assets/git-sumi_demo.mp4" title="git-sumi demo"></video>
|
||||
|
@ -19,21 +22,12 @@ canonical_url = "https://osc.garden/es/projects/git-sumi/"
|
|||
|
||||
## Características principales
|
||||
|
||||
- **Reglas personalizables**: Configura git-**sumi** para satisfacer los requisitos específicos de cada proyecto. Configura reglas para Conventional Commits, límites de longitud, uso de Gitmoji y más a través de un archivo de un sencillo archivo de configuración TOML.
|
||||
- **Reporte de errores claro**: Proporciona un reporte de errores detallado, haciendo que la corrección sea sencilla y educativa.
|
||||
- **Integración sin fisuras**: Al ser único binario, git-**sumi** se integra fácilmente en tu flujo de trabajo. Incluso puedes usar la [Acción de GitHub](https://github.com/welpo/git-sumi-action) para validar tus commits (o títulos de PR) sin necesidad de instalar nada localmente.
|
||||
- **Reglas personalizables**: Configura reglas para [Conventional Commits](https://www.conventionalcommits.org/), límites de longitud, uso de [Gitmoji](https://gitmoji.dev/) y [más](https://sumi.rs/docs/rules).
|
||||
- **Reporte de errores claro**: Proporciona errores detallados, haciendo que la corrección sea sencilla y educativa.
|
||||
- **Integración sencilla**: Al ser único binario, git-sumi se integra fácilmente en tu flujo de trabajo. Puedes usar la [Acción de GitHub](https://github.com/welpo/git-sumi-action) para validar commits (o títulos de PR) sin instalar nada.
|
||||
|
||||
## Buenas prácticas de desarrollo
|
||||
|
||||
- **Amplia cobertura del código**: Más del 95% de cobertura de líneas y una cobertura de características exhaustiva garantizan la robustez de git-**sumi**.
|
||||
- **Integración [continua](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) y [publicación](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml)**: Flujos de trabajo automatizados para probar, integrar y publicar aseguran que cada versión de git-**sumi** esté completamente probada y lista para su uso.
|
||||
- **Contribuciones de la comunidad**: Fomenta las contribuciones de la comunidad de todo tipo, con un enfoque acogedor tanto para los recién llegados como para los desarrolladores experimentados.
|
||||
- [**Documentación exhaustiva**](https://sumi.rs/docs/) para empezar con git-**sumi** y comprender sus características y capacidades.
|
||||
|
||||
## Empieza a mejorar tus prácticas de commit hoy
|
||||
|
||||
Da el primer paso hacia la transformación de tus prácticas de commit. La combinación de flexibilidad, retroalimentación detallada y fácil integración de git-**sumi** lo convierte en la opción perfecta para equipos e individuos que buscan mejorar sus mensajes de commit.
|
||||
|
||||
[Descubre **git-sumi**](https://sumi.rs/) y hazlo parte de tu kit de herramientas de desarrollo.
|
||||
|
||||
[](https://sumi.rs/)
|
||||
- **Cobertura de código**: 98% de cobertura de código; un linter debe ser robusto.
|
||||
- **[Integración](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) y [publicación](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml) continua**: Flujos automatizados para testing y publicación de binarios multiplataforma en crates.io, PyPI y GitHub releases.
|
||||
- **Documentación**: [Documentación completa](https://sumi.rs/docs/) con [guía rápida](https://sumi.rs/docs/), [ejemplos](https://sumi.rs/docs/examples), [reglas](https://sumi.rs/docs/rules), [integración](https://sumi.rs/docs/integration), [FAQ](https://sumi.rs/docs/faq)...
|
||||
|
|
|
@ -3,13 +3,16 @@ title = "git-sumi"
|
|||
description = "The non-opinionated Rust-based commit message linter."
|
||||
weight = 10
|
||||
|
||||
[taxonomies]
|
||||
tags = ["Git", "Rust", "Continuous Integration", "GitHub Actions", "CLI", "automation"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/git-sumi/git-sumi_logo.webp"
|
||||
social_media_card = "social_cards/projects_git-sumi.jpg"
|
||||
canonical_url = "https://osc.garden/projects/git-sumi/"
|
||||
+++
|
||||
|
||||
**git-sumi** is a non-opinionated commit message linter written in Rust. It's a flexible tool to enforce commit message standards, ensuring consistent and automation-friendly commit messages.
|
||||
**git-sumi** is the non-opinionated commit message linter written in Rust.
|
||||
|
||||
{% wide_container() %}
|
||||
<video controls src="https://cdn.jsdelivr.net/gh/welpo/git-sumi@main/assets/git-sumi_demo.mp4" title="git-sumi demo"></video>
|
||||
|
@ -17,23 +20,14 @@ canonical_url = "https://osc.garden/projects/git-sumi/"
|
|||
|
||||
#### [GitHub](https://github.com/welpo/git-sumi) • [Website](https://sumi.rs/) • [Documentation](https://sumi.rs/docs/) {.centered-text}
|
||||
|
||||
## Main Features
|
||||
## Main features
|
||||
|
||||
- **Customizable rules**: Tailor git-sumi to meet the specific requirements of each project. Configure rules to enforce Conventional Commits, length limits, Gitmoji usage, and more through a simple TOML configuration file.
|
||||
- **Customizable rules**: Configure rules to enforce [Conventional Commits](https://www.conventionalcommits.org/), length limits, [Gitmoji](https://gitmoji.dev/) usage, and [more](https://sumi.rs/docs/rules).
|
||||
- **Clear error reporting**: Provides detailed error reporting, making fixing commit messages straightforward and educational.
|
||||
- **Seamless integration**: As a single binary, git-sumi integrates easily into your existing workflow with minimal setup. You can even use the [GitHub Action](https://github.com/welpo/git-sumi-action) to lint your commits (or PR titles) without installing anything locally.
|
||||
- **Seamless integration**: As a single binary, git-sumi easily integrates into your existing workflow with minimal setup. You can even use the [GitHub Action](https://github.com/welpo/git-sumi-action) to lint your commits (or PR titles) without installing anything.
|
||||
|
||||
## Development Best Practices
|
||||
## Development best practices
|
||||
|
||||
- **Comprehensive code coverage**: Over 95% line coverage and thorough feature coverage ensures that git-sumi is reliable, robust, and ready for use.
|
||||
- **Continuous [integration](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) and [deployment](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml)**: Automated workflows for testing, releasing, and deploying, ensuring that each version of git-sumi is thoroughly tested and ready for use.
|
||||
- **Community contributions**: Encourages contributions from the community, including feature requests, bug reports, and enhancements, with a welcoming approach to both newcomers and seasoned developers.
|
||||
- **Documentation**: [Comprehensive documentation](https://sumi.rs/docs/) to help users get started with git-sumi and understand its features and capabilities.
|
||||
|
||||
## Start Enhancing Your Commit Practices Today
|
||||
|
||||
Take the first step towards transforming your commit practices. git-sumi's blend of flexibility, detailed feedback, and ease of integration makes it the perfect choice for teams and individuals looking to improve their Git commit messages.
|
||||
|
||||
[Discover **git-sumi**](https://sumi.rs/) and make it a part of your development toolkit.
|
||||
|
||||
[](https://sumi.rs/)
|
||||
- **Comprehensive code coverage**: 98% test coverage; linting needs to be reliable.
|
||||
- **Continuous [integration](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) and [deployment](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml)**: Automated workflows for testing and releasing cross-compiled binaries to crates.io, PyPI and GitHub releases.
|
||||
- **Documentation**: [Comprehensive documentation](https://sumi.rs/docs/) with a [quick start guide](https://sumi.rs/docs/), [examples](https://sumi.rs/docs/examples), [rules](https://sumi.rs/docs/rules), [integration](https://sumi.rs/docs/integration), [FAQ](https://sumi.rs/docs/faq)…
|
||||
|
|
|
@ -3,6 +3,9 @@ title = "nani"
|
|||
description = "Script Bash per crear URLs públiques a partir d'arxius o text en servidors remots."
|
||||
weight = 50
|
||||
|
||||
[taxonomies]
|
||||
tags = ["bash", "CLI"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/nani/nani_logo.webp"
|
||||
canonical_url = "https://osc.garden/ca/projects/tabi/"
|
||||
|
|
|
@ -3,6 +3,9 @@ title = "nani"
|
|||
description = "Script Bash para crear URLs públicas a partir de archivos o texto en servidores remotos."
|
||||
weight = 50
|
||||
|
||||
[taxonomies]
|
||||
tags = ["bash", "CLI"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/nani/nani_logo.webp"
|
||||
canonical_url = "https://osc.garden/es/projects/tabi/"
|
||||
|
|
|
@ -3,6 +3,9 @@ title = "nani"
|
|||
description = "Bash script to create public URLs from files or text on remote servers."
|
||||
weight = 50
|
||||
|
||||
[taxonomies]
|
||||
tags = ["bash", "CLI"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/nani/nani_logo.webp"
|
||||
canonical_url = "https://osc.garden/projects/tabi/"
|
||||
|
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 30 KiB |
35
content/projects/nemui/index.ca.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
+++
|
||||
title = "nemui"
|
||||
description = "Ajusta gradualment el teu horari de son amb suport per horari d'estiu."
|
||||
weight = 22
|
||||
|
||||
[taxonomies]
|
||||
tags = ["son", "interactiu", "web app", "web", "JavaScript"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/nemui/nemui_logo.webp"
|
||||
canonical_url = "https://osc.garden/ca/projects/tabi/"
|
||||
social_media_card = "social_cards/projects_nemui.jpg"
|
||||
+++
|
||||
|
||||
nemui és una aplicació web que t'ajuda a fer una transició suau a un nou horari de son. El seu nom ve de les paraules japoneses per dormir (<ruby>眠<rt>nemu</rt></ruby>) i transició (<ruby>移<rt>i</rt></ruby>), que es llegeix com <ruby>眠い<rt>nemui</rt></ruby> (somnolent).
|
||||
|
||||
#### [Prova-la ara](https://nemui.osc.garden) • [GitHub](https://github.com/welpo/nemui) • [Blog](https://osc.garden/ca/blog/nemui-sleep-schedule-planner/) {.centered-text}
|
||||
|
||||
## Característiques
|
||||
|
||||
- Interfície interactiva de rellotge inspirada en Apple
|
||||
- Ajust gradual de l'horari de son basat en la ciència del son
|
||||
- Suport complet per a l'horari d'estiu (DST)
|
||||
- Exportació a calendari (.ics) amb recordatoris per anar a dormir
|
||||
- Emmagatzematge local per seguir el teu progrés
|
||||
- Accessible: compatible amb navegació per teclat i lectors de pantalla
|
||||
|
||||
## Per què nemui?
|
||||
|
||||
A diferència dels canvis bruscos que poden alterar el teu ritme circadià, nemui t'ajuda a ajustar el teu horari de son de manera gradual. És especialment útil per a:
|
||||
|
||||
- Adaptar-te a nous horaris de feina/estudi
|
||||
- Preparar-te per a canvis de zona horària
|
||||
- Fer una transició suau durant els canvis d'hora
|
||||
- Corregir un horari de son desajustat
|
35
content/projects/nemui/index.es.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
+++
|
||||
title = "nemui"
|
||||
description = "Ajusta gradualmente tu horario de sueño con soporte para horario de verano."
|
||||
weight = 32
|
||||
|
||||
[taxonomies]
|
||||
tags = ["sueño", "interactivo", "web app", "web", "JavaScript"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/nemui/nemui_logo.webp"
|
||||
canonical_url = "https://osc.garden/es/projects/tabi/"
|
||||
social_media_card = "social_cards/projects_nemui.jpg"
|
||||
+++
|
||||
|
||||
nemui es una aplicación web que te ayuda a hacer una transición suave a un nuevo horario de sueño. Su nombre viene de las palabras japonesas para dormir (<ruby>眠<rt>nemu</rt></ruby>) y transición (<ruby>移<rt>i</rt></ruby>), que se lee como <ruby>眠い<rt>nemui</rt></ruby> (somnoliento).
|
||||
|
||||
#### [Pruébala ahora](https://nemui.osc.garden) • [GitHub](https://github.com/welpo/nemui) • [Blog](https://osc.garden/es/blog/nemui-sleep-schedule-planner/) {.centered-text}
|
||||
|
||||
## Características
|
||||
|
||||
- Interfaz interactiva de reloj inspirada en Apple
|
||||
- Ajuste gradual del horario de sueño basado en la ciencia del sueño
|
||||
- Soporte completo para el horario de verano (DST)
|
||||
- Exportación a calendario (.ics) con recordatorios para dormir
|
||||
- Almacenamiento local para seguir tu progreso
|
||||
- Accesible: compatible con navegación por teclado y lectores de pantalla
|
||||
|
||||
## ¿Por qué nemui?
|
||||
|
||||
A diferencia de los cambios bruscos que pueden alterar tu ritmo circadiano, nemui te ayuda a ajustar tu horario de sueño de forma gradual. Es especialmente útil para:
|
||||
|
||||
- Adaptarte a nuevos horarios de trabajo/estudio
|
||||
- Prepararte para cambios de zona horaria
|
||||
- Hacer una transición suave durante los cambios de hora
|
||||
- Corregir un horario de sueño desajustado
|
35
content/projects/nemui/index.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
+++
|
||||
title = "nemui"
|
||||
description = "Gradually adjust your sleep schedule with support for DST transitions."
|
||||
weight = 32
|
||||
|
||||
[taxonomies]
|
||||
tags = ["sleep", "interactive", "web app", "web", "JavaScript"]
|
||||
|
||||
[extra]
|
||||
local_image = "projects/nemui/nemui_logo.webp"
|
||||
canonical_url = "https://osc.garden/projects/tabi/"
|
||||
social_media_card = "social_cards/projects_nemui.jpg"
|
||||
+++
|
||||
|
||||
nemui is a web app that helps you smoothly transition to a new sleep schedule. Named after the Japanese words for sleep (<ruby>眠<rt>nemu</rt></ruby>) and transition (<ruby>移<rt>i</rt></ruby>), reading as <ruby>眠い<rt>nemui</rt></ruby> (sleepy).
|
||||
|
||||
#### [Try it now](https://nemui.osc.garden) • [GitHub](https://github.com/welpo/nemui) • [Blog post](https://osc.garden/blog/nemui-sleep-schedule-planner/) {.centered-text}
|
||||
|
||||
## Features
|
||||
|
||||
- Interactive clock interface inspired by Apple
|
||||
- Gradual sleep schedule adjustment based on sleep science
|
||||
- Full Daylight Saving Time (DST) support
|
||||
- Calendar (.ics) export with bedtime reminders
|
||||
- Local storage for progress tracking
|
||||
- Accessible: supports keyboard navigation and screen readers
|
||||
|
||||
## Why nemui?
|
||||
|
||||
Unlike abrupt changes that can disrupt your circadian rhythm, nemui helps you adjust your sleep schedule gradually. It's particularly useful for:
|
||||
|
||||
- Adapting to new work/study schedules
|
||||
- Preparing for timezone changes
|
||||
- Smoothly transitioning through DST changes
|
||||
- Fixing a misaligned sleep schedule
|