Coder Social home page Coder Social logo

vuepress-test's Introduction

custom list sidebarDepth
Title
one
two
three
2

Home page

This is the home page of your vuepress site. Go nuts with markdown.

'example'.slice();

Vuepress notes

Overview

  • Vuepress has two parts:
  • static site generator command line tool
  • default theme for a static site intended for technical docs

Installation

  • 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!

Dev

  • 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)

Config

  • Add .vuepress/config.js
  • Config title appears in header
  • Config description is meta
  • Webpage title is vuepress page title joined with config title

Deploy

Links

Vue

  • 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

  • Frontmatter for the current page is available on the $page object: {{ $page.frontmatter }}
  • Set front matter with yaml at top of this markdown file

Vue script and style

  • Each markdown file is essentially a vue component, so you can do script and style per page
  • So this can be styled with css: blue text
  • Check out the console for js from this page
<script> export default { mounted() { console.log('hello from home page') } } </script> <style> .blue { color: blue; } </style>

Vue components

  • Add components to .vuepress/components. These are registered as global, async components, like this block quote:
This is the quotation.

Vuepress default theme notes

Navbar

  • Nav bar links are specified in .vuepress/config.js at themeConfig.nav.
  • Make a dropdown by nesting items

Sidebar

  • Specify pages to show in sidebar themeConfig.sidebar to config.
  • Displays h2 by default; specify sidebarDepth in frontmatter per page to display h3

Prev/Next links

  • Automatically inferred from link order in sidebar config.

Wrap up

  • Most configs can be configured in the frontmatter per page
  • Check out the default theme config and config reference in the vuepress docs

vuepress-test's People

Contributors

lukechinworth avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.