Skip to content

Commit

Permalink
[theme][m]: introduce vuepress (no refactoring of content yet).
Browse files Browse the repository at this point in the history
  • Loading branch information
rufuspollock authored and lauragift21 committed May 5, 2020
1 parent 7620571 commit a525dba
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules/*
schemas/dictionary.json
package-lock.json
.idea
.vuepress/dist/*
23 changes: 23 additions & 0 deletions .vuepress/components/mermaid.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// .vuepress/components/mermaid.vue

<template>
</template>

<style>
div.language-mermaid {
background-color: inherit
}
</style>

<script>
export default {
beforeMount() {
import("mermaid/dist/mermaid").then(m => {
m.initialize({
startOnLoad: true
});
m.init('div.language-mermaid>pre>code');
});
}
};
</script>
24 changes: 24 additions & 0 deletions .vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
title: 'Frictionless Data Specs',
description: '',
markdown: {
linkify: true,
typographer: true,
breaks: true,
html: true,
toc: {
includeLevel: [2, 3, 4]
},
extendMarkdown: md => {
md.use(require('markdown-it-footnote'))
}
},
themeConfig: {
repo: 'https://github.com/frictionlessdata/specs',
editLinks: true,
sidebar: 'auto',
nav: [
{ text: 'Home', link: '/' }
]
}
}
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"main": "index.js",
"scripts": {
"build": "node build.js",
"test": "NODE_ENV=testing mocha"
"test": "NODE_ENV=testing mocha",
"start": "yarn start:docs",
"start:docs": "npx vuepress dev",
"build:docs": "npx vuepress build"
},
"repository": {
"type": "git",
Expand All @@ -25,6 +28,9 @@
"js-yaml": "^3.7.0",
"json-schema-ref-parser": "^3.1.2",
"mocha": "^4.0.1",
"tv4": "^1.3.0"
"tv4": "^1.3.0",
"vuepress": "^1.2.0",
"markdown-it-footnote": "",
"mermaid": "^8.1.0"
}
}

0 comments on commit a525dba

Please sign in to comment.