---
pageClass: custom-page-class
title : mine
sidebar : true
navbar : true
---
# My Markdown
[doc](https://v2.vuepress.vuejs.org/)
Time now : . This page is README.md
Calling my component demo :
::: slot footer
MIT Licensed | Copyright © 2018-present [Evan You](https://github.com/yyx990803)
:::
```bash
yarn create vuepress-site [optionalDirectoryName]
```
```bash
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
``` yaml
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.