root dbdc9f6c92 ignore swp files 1 an în urmă
..
demo ee7ec21db9 init 2 ani în urmă
dot_vuepress dbdc9f6c92 ignore swp files 1 an în urmă
Dockerfile ee7ec21db9 init 2 ani în urmă
README.md ee7ec21db9 init 2 ani în urmă
build.sh ee7ec21db9 init 2 ani în urmă
entrypoint.sh 92f892dca5 cp 2 ani în urmă
init.json ee7ec21db9 init 2 ani în urmă
match-query.js ee7ec21db9 init 2 ani în urmă
package.json ee7ec21db9 init 2 ani în urmă

README.md


pageClass: custom-page-class title : mine sidebar : true

navbar : true

My Markdown

doc

Time now : . This page is README.md

Calling my component demo :

::: slot footer MIT Licensed | Copyright © 2018-present Evan You :::

yarn create vuepress-site [optionalDirectoryName]

npx create-vuepress-site [optionalDirectoryName]

QCH

Changes

  • Amend file docs/.vuepress/config.js to examine the folder docs and display it as a tree.

  • save/match-query.js will replace node_modules/@vuepress/plugin-search/match-query.js - so that it searches entire document instead of just title headers and $ tag ( debugging messages in console.log if > 4 characters )

    if ( query.length < 4 ) return false ;
    // console.log ( { in : "match-query.js" , query , path : page.path } ) ;
    var res = matchTest(query, page.pagecontent) ;
    return res ;
    

File config.js set the max number of suggestions

	// sidebar
	themeConfig: {
		sidebar: sidebar,
		searchMaxSuggestions : 10 ,
		lastUpdated: 'Last Updated' 			// string | boolean 
	},

Run this. Bc it is installing to .vuepress, has to do it AFTER starting the container

npm install --save-dev /vp/docs/.vuepress/plugins/pageData
  • amend docs/.vuepress/plugins/pageData/index.js and change from $page.pagecontent = $page.content to $page.pagecontent = $page._content

Adding a component

Just add the VUE file to .vuepress/components, no need to declare anything.

Add an external JS file

Add this to .vuepress/config.js

	head: [
		['script', { src: 'https://cdnjs.cloudflare.com/ajax/libs/viz.js/1.3.0/viz.js' }]
	]

Add a plugin.

See .vuepress/plugins/pageData for sample.

Building vuepress

kinisi/vuepress should be used for all markdowns. It is built in adele:/vuepress/build.

Run with this docker-compose

  vuepress :

    image: kinisi/vuepress
    restart : always
    volumes:
      - ./markdowns:/vp/docs
    ports :
      - 5555:8080
    working_dir: /vp
    command :
      - /bin/sh
      - -c
      - |
        npm install --save-dev /vp/docs/.vuepress/plugins/pageData
        npm run docs:dev

The adele/docs folder contains all the markdowns and should have a .vuepress folder. There is a sample .vuepress in the /vp image.