Skip to content

Commit

Permalink
[docs] hyperledger-iroha#89: Add scripts, Vue component, parser exten…
Browse files Browse the repository at this point in the history
…sion, update tutorial

Signed-off-by: 6r1d <vic.6r1d@gmail.com>
  • Loading branch information
6r1d committed Sep 21, 2022
1 parent d8374a8 commit 104f6e0
Show file tree
Hide file tree
Showing 29 changed files with 2,113 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dist
/src/flymd.md
/src/flymd.html
/src/*.temp
/src/snippets
25 changes: 22 additions & 3 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import { defineConfig, UserConfig, DefaultTheme } from 'vitepress'
import Windi from 'vite-plugin-windicss'
import footnote from 'markdown-it-footnote'
import customHighlight from './plugins/highlight'
import path from 'path'
import { resolve } from 'path'
import { VitePWA } from 'vite-plugin-pwa'
import { snippets_plugin } from './snippet_tabs'
import svgLoader from 'vite-svg-loader'
import { getHighlighter } from "shiki";

async function themeConfig() {
const cfg: UserConfig = {
Expand Down Expand Up @@ -157,6 +160,15 @@ function getGuideSidebar(): DefaultTheme.SidebarGroup[] {
},
],
},
{
text: 'Documenting Iroha',
items: [
{
text: 'Code snippets',
link: '/documenting/snippets',
},
],
},
]
}

Expand All @@ -172,7 +184,7 @@ export default defineConfig({
lang: 'en-US',
vite: {
plugins: [
Windi({ config: path.resolve(__dirname, '../windi.config.ts') }),
Windi({ config: resolve(__dirname, '../windi.config.ts') }),
VitePWA({
// Based on: https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs
manifest: {
Expand All @@ -193,6 +205,7 @@ export default defineConfig({
strategies: 'injectManifest',
injectRegister: false,
}),
svgLoader()
],
},
lastUpdated: true,
Expand All @@ -205,8 +218,14 @@ export default defineConfig({
],

markdown: {
config(md) {
async config(md) {
md.use(footnote)
snippets_plugin(md, {
'snippet_root': resolve(__dirname, '../src/snippets/'),
'highlighter': await getHighlighter({
theme: "github-light"
})
})
},
},

Expand Down
Loading

0 comments on commit 104f6e0

Please sign in to comment.