Skip to main content
This release is 22 versions behind 0.0.300 β€” the latest version of @sys/driver-vitepress. Jump to latest

Built and signed on GitHub Actions

Tools for working with the VitePress documentation SSG (static-site-generator).

This package works with Deno, Browsers
This package works with Deno
This package works with Browsers
JSR Score
100%
Published
4 weeks ago (0.0.278)

VitePress Driver

Tools for working with the "VitePress" documentation SSG (static-site-generator).

 

NB: <UI Frameworkℒ️> agnostic.


Initialize (New Instance): 🧫

Scaffold a new project within the current-working-directory (cwd) on the local file-system:

deno run -A jsr:@sys/driver-vitepress/init

 

Build Toolchain (Compilation β†’ Pipeline β†’ πŸ’¦)

diagram

Command Interface (Common)

deno task help

 ↓

Usage: deno task [COMMAND]
                                                                         
  deno task dev       Run the development server.                  
  deno task build     Transpile to production bundle.
  deno task serve     Run a local HTTP server over the production bundle.

  deno task upgrade   Upgrade to latest version.                    
  deno task backup    Take a snapshot of the project.
  deno task clean     Delete temporary files.
  deno task help      Show help.

JSR Publishing

Before publishing to JSR ensure you update the embedded templates file-map.

deno task prep

↑ updates template file changes into src/-tmpl/u.tmpl/tmpl.bundle.json

Examples

Initialize a folder as a VitePress project.

To initialize a new content-transpiler project start by scaffolding out a runtime folder: By default, the source content will be housed within /docs folder. All programmatic modules (with the exceptions of highlevel configuration .ts files) are housed within .hidden folders and auto-updatable via deno task upgrade.

Turn the current working directory into a content project.

deno run -A jsr:@sys/driver-vitepress/init

Once the project is initialized, use the three main commands dev, build and serve via the deno task command.

To run in development while authoring your content, run:

deno task dev

this will start the HMR (hot-module-reload) development server:


   vitepress v<X.X.X>

   ➜  Local:   http://localhost:1234/
   ➜  Network: use --host to expose

Open the web-browser at http://localhost:1234/

You can now move over to Obsidian (or any other markdown editor of choice) to author and manage your content within the /docs/ folder.

The running HMR (hot-module-reload) the server will display the rendered result in your browser, live updating on each edit you make.


Once ready to release, build the content into a package/bundle to deploy to the cloud. You can test it locally using the local serve command:

deno task build
deno task serve

See the dist/dist.json file for the SHA256 content hash and module manifest of the versioned bundled. This can be used as a

These are published in HTTP headers:

  pkg:          { name, version }
  pkg-digest:   <hash:sha256>

To upgrade your current local version of the compiler, run:

deno task upgrade

Migration Note: this does not touch the state of the "content" - only the compiler configuration and generated code assets.

Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@sys/driver-vitepress

Import symbol

import * as driver_vitepress from "@sys/driver-vitepress";

---- OR ----

Import directly with a jsr specifier

import * as driver_vitepress from "jsr:@sys/driver-vitepress";