Skip to content

Commit

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

Co-authored-by: 0x009922 <a.marcius26@gmail.com>
Signed-off-by: 6r1d <vic.6r1d@gmail.com>
  • Loading branch information
6r1d and 0x009922 committed Sep 22, 2022
1 parent d8374a8 commit 11cde46
Show file tree
Hide file tree
Showing 29 changed files with 2,208 additions and 29 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 11cde46

Please sign in to comment.