miniPress is a very simple and minimalistic implementation of a subset of VuePress/Saber.
miniPress is a mini-mal static site generator. It was created for educational purposes. Sometimes having something small and minimal (and probably incomplete) helps to get the big picture.
MiniContent allows you to embed pages in other pages. You can use this for a lot of things. Here are a couple of use-cases to give you an idea:
Don’t repeat yourself: Imagine you have some kind of warning message that you want to display on multiple pages. Instead of copy and pasting the warning message every time you need it you save it in a regular Markdown file and then embed it where you need it by using MiniContent.
Use Markdown Features in *.vue-files: It is not that easy to use Markdown features within *.vue-files. Imagine you want to create a page that needs to use certain Vue-features. Great. You create a page using the vue-file format. But now you can’t use Markdown features like syntax highlighting, containers, etc. This is where MiniContent comes in. Simply store your Markdown content inside a *.md-file and embed it using MiniContent.
By default, miniPress installs a property called $minipress on every Vue instance. This provides you with a lot of interesting meta data about your miniPress site (pages, heading, …). You also get access to some convenience methods.
$minipress exposes certain properties and methods which you can access from almost everywhere. You can access $minipress from
any JavaScript file by using this.$minipress.property_or_method,
any Vue <template>-section by using $minipress.property_or_method and
any Markdown file by using {{ $minipress.property_or_method }}.
Replace property_or_method by any of the documented properties/methods (see below).
$minipress-Instance API
Root miniPress instance.
Methods
pageLink
Finds a page with relativePath = to and returns it’s path
Use $minipress.pageLink(to) in order to get an absolute path for a given relative path. to should be the path to a page as it appears in your file system. For example,
$minipress.pageLink('./themes/clean.md')
basically returns the value for the href-attribute.
Arguments:
to: string: Relative path to a page as it is present in your file system.
miniPress comes with a CLI. The CLI is part of the @minipress/minipress package and thus is installed by default.
minipress --help
Usage:
$ minipress <command> [options]
Commands:
dev runs miniPress in dev mode in the current directory
generate generates a static version of your site
serve serves a static version of your site
For more info, run any command with the `--help` flag:
$ minipress dev --help
$ minipress generate --help
$ minipress serve --help
Options:
--config <file> path to config file (default: ./minipress.config.js)
--mode <mode> mode of operation (default: development)
-h, --help Display this message