Skip to content
lazyvimxPublic

About

Documentation site for lazyvimx: Astro and Svelte, docs synced from lazyvimx/nvim

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

130 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English Русский

lazyvimx: an enhancement layer for LazyVim

Deploy Site status Node Astro Svelte lazyvimx release License

The documentation site for lazyvimx, the enhancement layer for LazyVim

Docs in English and Russian, dressed up as Neovim: a statusline, vim keys, a tutor and site search

Landing page
Landing with a demo recording
Documentation page
Docs with the file tree and the statusline

Lives at lazyvimx.aimuzov.online. A static site on Astro with Svelte islands, made from infra-site-template.

What's inside

  • Docs (/getting-started, /extras, …, and the same under /ru/): page texts live in lazyvimx/nvim (README*.md, docs/*.md). Edit them there, this repo only lays them out.
  • Landing pages (/, /ru/): hero with the demo recording and the feature tiles from src/frontend/data/home.ts.
  • The Neovim layer (src/frontend/components/vim): lualine-style statusline, j/k/gg/G/}/L/H and friends, link hints on f, a command line on :, which-key, an interactive tutor. Keys work on the Russian layout too.
  • Search: Pagefind, a separate index per language. Opens with /, Cmd/Ctrl-K or the button in the header.
  • Demo recordings: mp4 from the assets branch of lazyvimx/nvim via jsDelivr, loaded only once scrolled into view.
  • Analytics: Yandex Metrika from infra-site-kit, it adds its own sources to the CSP.

How it works

  • scripts/sync-docs.ts takes the docs from ../nvim, from LAZYVIMX_DIR or from a fresh clone of the main branch and writes them to src/frontend/content/docs/{en,ru}. The lazyvimx version for the statusline goes to src/frontend/data/version.json. Both are generated and ignored by git; dev, build and check run the sync themselves.
  • src/sync: pure text transforms of the docs and a Sätteri plugin for headings, code blocks and external links. Heading slugs follow VitePress, so links from the old site keep working.
  • src/frontend: the site itself, the srcDir in astro.config.mjs. Imports go through #frontend/*.

Everything about the server lives in deploy: Dockerfile, compose and nginx. The image pulls the docs from lazyvimx/nvim@main on every build, so fresh docs don't need a site release.

Running

Stack and layout come from infra-site-template: Astro + Svelte 5, Prettier, oxlint, stylelint (BEM), node --test for unit tests, Playwright for e2e. Prettier, stylelint, oxlint and Playwright configs and the CI steps come from infra-site-kit. Node comes from mise.toml.

cp .env.example .env   # may stay empty, but the file must exist
npm ci
npm run dev

Search works only in the built site: npm run build && npm run preview.

Before a commit, the same checks as CI:

npm run format:check && npm run lint:js && npm run lint:css && npm run check && npm test && npm run build

E2E tests in e2e build the site and open it in Chromium: every sitemap page answers without console errors and passes axe in both schemes, the theme switch and Metrika behave, the vim keys and search work in both languages.

npm run test:e2e

Content Security Policy

The build puts a CSP with hashes of the Astro scripts and styles into every page (security.csp in astro.config.mjs). On top of the template the site allows jsDelivr for the demo recordings, Repobeats for the README activity image, WebAssembly for Pagefind and inline style attributes for the Shiki highlighting. In npm run dev there is no policy, so violations show up only after npm run build && npm run preview.

Deploy

The projects server from infra-server: merging the release PR that release-please keeps up to date starts deploy.yml, which runs the checks and logs in over SSH. There the key starts the shared deploy/site.sh, which checks out the release tag and rebuilds the lazyvimx-site container (nginx with the static files). The domain and TLS are held by the shared Caddy.

The deploy job runs only when the repository variable DEPLOY_ENABLED is true and the SSH key is in the DEPLOY_SSH_KEY secret.

A lazyvimx release only needs to redeploy the latest site tag, the image picks up fresh docs by itself: gh workflow run deploy.yml -R lazyvimx/site -f tag=v1.2.3. The same command with an older tag rolls back.

License

The code is under the MIT license. The site content (texts, images, names and contacts) is not covered by it: all rights reserved.

About

Documentation site for lazyvimx: Astro and Svelte, docs synced from lazyvimx/nvim

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages