Skip to content

Conversation

@radiorambo
Copy link

Context: #50

A homepage and docs website for marktext.

  • Adds homepage and documentation website using vitepress
  • Auto deploy changes made in /docs using github actions
  • Deploys to tkaixiang.github.io/marktext url after merging PR
  • No documentation content changes are made

radiorambo and others added 8 commits January 8, 2026 16:55
Add VitePress output directories to .gitignore to prevent
committed build artifacts and cache from polluting the repository.
This keeps the working tree clean and avoids accidental commits of
generated files under docs/.vitepress/dist and docs/.vitepress/cache.
Add initial docs package with VitePress dev dependencies and scripts,
and create site configuration for documentation under docs/.vitepress.
Introduce navigation, sidebar structure with translations, editing,
customization, key bindings, advanced and development sections, social
link and local search provider. Add a home index.md with hero content,
features list, actions and links to translations.

These changes provide a structured documentation site scaffold so the
project can serve and build documentation using VitePress.
Update image references in French, Portuguese and Spanish i18n
README files to use root-relative paths and simplify markdown tables.
Replace ../../static/logo-small.png with /logo-small.png and change
../image?raw=true references to root-based paths like /marktext.png,
/themeImages/* and /source.gif etc. Adjust table formatting to keep
alignment and improve consistency across translations.

This ensures images render correctly when served from the site root and
reduces broken links in localized documentation.
Add a new workflow (.github/workflows/deploy.yml) that builds and deploys
the VitePress documentation from the docs/ directory to GitHub Pages.

Key changes:
- Trigger on pushes to main and manual workflow_dispatch; watch docs/** and
  the workflow file itself.
- Configure GITHUB_TOKEN permissions for Pages deployment (pages: write,
  contents: read, id-token: write).
- Add concurrency group to avoid overlapping deployments while allowing
  in-progress runs to finish.
- Build job: checkout repo, setup Node (v24) with npm cache, install
  dependencies in docs/, and build site with npm run docs:build.
- Upload built site artifact from docs/.vitepress/dist.
- Deploy job: configure pages environment and deploy artifact using
  actions/deploy-pages@v4.

Reason:
Automate site build and deployment to GitHub Pages to ensure the docs
are published on changes to the docs or when manually triggered.
Update VitePress config to use /marktext as the base path
instead of /docs. This asset and route resolution when the
site is deployed under the /marktext subpath, preventing broken
links and incorrect resource loading.
Add a generated package-lock.json under docs to lock dev dependencies
used by the documentation site (VitePress and related packages).
This commit captures exact package versions and integrity hashes so that
installations of the docs environment are deterministic across machines
and CI.
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.

1 participant