Skip to content

Docs/i18n and better quick-start#213

Merged
Triple-Z merged 20 commits intodeb-sig:masterfrom
fatsheep2:docs/i18n-and-quickstart
Mar 10, 2026
Merged

Docs/i18n and better quick-start#213
Triple-Z merged 20 commits intodeb-sig:masterfrom
fatsheep2:docs/i18n-and-quickstart

Conversation

@fatsheep2
Copy link
Copy Markdown
Contributor

Description

This PR fixes the language switching functionality on GitHub Pages deployment. The language switcher links were not working correctly after deployment, even though they worked fine in local development. Additionally, this PR removes unused navigation files and updates .gitignore to prevent committing Python cache files.

Changes:

  • Fixed alternate language links in mkdocs.yml to use relative paths (./ and ./en/) instead of empty string and bare path
  • Removed unused navigation.yml and navigation_en.yml files from docs/_data/ directory
  • Updated .gitignore to include Python cache file patterns (__pycache__/, *.pyc, *.pyo, *.pyd, .Python)

Motivation and Context

After migrating documentation from Jekyll to MkDocs and deploying to GitHub Pages, the language switching feature (中文/English) was not working correctly on the deployed site. While it worked perfectly in local development with mkdocs serve, clicking the language switcher on GitHub Pages would not navigate properly.

The root cause was that the alternate configuration in mkdocs.yml used:

  • link: "" for Chinese (which didn't resolve correctly on GitHub Pages)
  • link: en for English (missing relative path prefix)

This PR fixes this by using proper relative paths that work consistently in both local development and GitHub Pages deployment.

Additionally, the navigation.yml and navigation_en.yml files were found to be unused (MkDocs uses navigation defined directly in mkdocs.yml), so they were removed to keep the repository clean.

Dependencies

No new dependencies are required. This is a configuration fix only.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

The changes have been tested in the following ways:

  • Local testing: Verified that language switching works correctly with mkdocs serve on http://127.0.0.1:8000

    • Tested switching from Chinese to English and back
    • Verified that all navigation links work correctly in both languages
  • GitHub Pages deployment: After pushing to the fork repository, verified that:

    • Language switcher buttons are clickable and functional
    • Navigation between Chinese and English versions works correctly
    • All relative links resolve properly on the deployed site

Test configuration:

  • MkDocs Material theme with i18n plugin
  • GitHub Pages deployment via GitHub Actions
  • Site URL: https://deb-sig.github.io/double-entry-generator

Is this change properly documented?

  • The changes are self-explanatory (configuration fixes)
  • Commit messages clearly describe what was changed and why
  • No additional documentation updates are needed as this is a bug fix for existing documentation infrastructure

Note: This PR does not require CHANGELOG or README updates as it fixes an existing feature rather than adding new functionality.

online preview site: https://fatsheep2.github.io/double-entry-generator/

fatsheep2 and others added 17 commits November 7, 2025 06:54
…instructions

- Refined feature list to highlight multi-bank and payment tool support.
- Improved installation instructions for Go and Homebrew.
- Added links to online documentation and configuration guides.
- Updated usage examples for various providers, including Alipay and WeChat.
- Enhanced overall readability and structure of the README.
…or providers and configuration guides

- Updated provider links to point to the online documentation.
- Enhanced configuration section with direct links for better accessibility.
- Improved overall readability by streamlining references to documentation.
- Introduced a new documentation file for 招商银行 (CMB) provider detailing CSV format support and usage instructions.
- Updated README to include direct links to the new CMB provider documentation for better accessibility.
- Enhanced the list of supported banks in both README and providers documentation.
- Added installation of system dependencies in the GitHub Actions workflow to ensure a stable build environment.
- Updated Jekyll version in the Gemfile to 4.3 for improved compatibility with GitHub Actions, replacing sass-embedded with sassc.
- Downgraded Jekyll version in the Gemfile to 4.2 for better compatibility with dependencies.
- Added command to remove the old Gemfile.lock in the GitHub Actions workflow to ensure fresh dependency resolution during builds.
- Downgraded Jekyll version in the Gemfile to 4.1 to ensure compatibility with sassc.
- Disabled bundler cache in the GitHub Actions workflow to force reinstallation of dependencies.
- Added verification step in the workflow to confirm the use of sassc instead of sass-embedded.
- Downgraded Jekyll version in the Gemfile to 3.9 to ensure compatibility with sassc, which has been thoroughly tested in GitHub Actions.
- Included the kramdown-parser-gfm gem in the Gemfile to enable support for GitHub Flavored Markdown (GFM) in Jekyll 3.9.
- Added verification for essential gems in the GitHub Actions workflow, ensuring kramdown and kramdown-parser-gfm are installed.
- Updated the Gemfile to include the kramdown gem for enhanced GFM markdown support.
- Add complete English documentation for all pages
- Add English navigation configuration
- Improve getting-started.md with detailed Alipay example
- Add English README
- Update main README with English link
- Remove Jekyll-related files and configurations from the documentation.
- Add MkDocs configuration and structure for improved documentation management.
- Update .gitignore to reflect new build files and dependencies.
- Introduce new documentation files for various providers and usage examples.
- Enhance CSS for better styling and responsiveness.
- Ensure deployment configuration for GitHub Pages is set up correctly.
…loyment

- Modify workflow triggers to allow builds on all branches, with deployments restricted to main/master.
- Enhance paths for triggering builds on documentation-related changes.
- Refactor mkdocs.yml update logic to use string replacement for configuration updates instead of YAML parsing.
… uv.lock

- Change the link for the Chinese language to an empty string for proper routing.
- Update the English language link to remove the leading slash for consistency.
- Add pyyaml as a new dependency in uv.lock with the required version.
…unused files

- Fix alternate language links in mkdocs.yml to use relative paths (./ and ./en/)
  This resolves the issue where language switching didn't work on GitHub Pages
  deployment, even though it worked locally

- Remove unused navigation.yml and navigation_en.yml files from docs/_data/
  These files were not referenced by MkDocs configuration and are redundant
  since navigation is defined directly in mkdocs.yml

- Update .gitignore to include Python cache files (__pycache__, *.pyc, etc.)
  This prevents accidentally committing Python bytecode files
@fatsheep2 fatsheep2 requested review from a team, Triple-Z and gaocegege as code owners January 15, 2026 12:09
@fatsheep2
Copy link
Copy Markdown
Contributor Author

fatsheep2 commented Jan 15, 2026

for #125 and #152

@fatsheep2
Copy link
Copy Markdown
Contributor Author

@Triple-Z 可以审阅一下哦,改动比较大的就是文档系统换了一个,我目测应该是没有什么问题了,i18n主要使用ai翻译

Comment thread docs/docs/en/examples/advanced-rules.md Outdated
- 文档中英双语(mkdocs-static-i18n),nav 与链接一比一
- 中文搜索:search_jieba + CJK 索引 + worker/main.js 补丁,本地/线上一致
- 本地预览:make serve-static,base path /double-entry-generator/
- 移除多余页与空目录:根 accounts、examples/README、assets,仅保留 configuration/accounts
- CI:构建后执行 patch_search_worker,部署分支增加 docs/i18n-and-quickstart 便于 fork 演示
- docs/README 补充构建、本地预览与线上验证说明~
@fatsheep2
Copy link
Copy Markdown
Contributor Author

预览地址:https://fatsheep2.github.io/double-entry-generator/

换了一个更美观一点的主题,patch了中文搜索和多语言

删除了不存在的高级功能

@Triple-Z 可以审阅了

Copy link
Copy Markdown
Member

@Triple-Z Triple-Z left a comment

Choose a reason for hiding this comment

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

LGTM

@Triple-Z Triple-Z merged commit f67d6b6 into deb-sig:master Mar 10, 2026
4 checks passed
@Triple-Z
Copy link
Copy Markdown
Member

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants