custom | list | sidebarDepth | |||
---|---|---|---|---|---|
Title |
|
2 |
This is the home page of your vuepress site. Go nuts with markdown.
'example'.slice();
- Vuepress has two parts:
- static site generator command line tool
- default theme for a static site intended for technical docs
- Global install for standalone project (e.g. solid book)
- Alternative is local install inside existing project (e.g. docs for a web project)
- 1305 packages. Holy shnikes!
vuepress dev
serves at http://localhost:8080/- Hot reload with updates
- Add more dirs and READMEs, e.g. /tv/README.md
- View at /tv/ (trailing slash required)
- Add .vuepress/config.js
- Config title appears in header
- Config description is meta
- Webpage title is vuepress page title joined with config title
vuepress build
builds to.vuepress/dist
by default- Simply serve as static site, e.g. on github pages, https://lukechinworth.github.io/vuepress-test/built-site/
- Link is the TV page will be updated with url base automatically
- Links do not refresh. Front end is single page app.
vuepress dev
will serve from base url config http://localhost:8080/vuepress-test/built-site/
- Md is compiled to html and then passed to vue-loader, so this works: {{ 3 + 4 }}
- You can access site metadata with the global
$page
: {{ $page }}
- Frontmatter for the current page is available on the
$page
object: {{ $page.frontmatter }} - Set front matter with yaml at top of this markdown file
- Each markdown file is essentially a vue component, so you can do
script
andstyle
per page - So this can be styled with css: blue text
- Check out the console for js from this page
- Add components to
.vuepress/components
. These are registered as global, async components, like this block quote:
This is the quotation.
- Nav bar links are specified in
.vuepress/config.js
atthemeConfig.nav
. - Make a dropdown by nesting
items
- Specify pages to show in sidebar
themeConfig.sidebar
to config. - Displays
h2
by default; specifysidebarDepth
in frontmatter per page to displayh3
- Automatically inferred from link order in sidebar config.
- Most configs can be configured in the frontmatter per page
- Check out the default theme config and config reference in the vuepress docs