diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index a82429d..211fb39 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -20,16 +20,13 @@ jobs: node-version: 20 - name: Install markdown-it and markdown-it-mermaid - run: | - npm install -g markdown-it-cli - npm install markdown-it markdown-it-mermaid + run: npm install markdown-it markdown-it-mermaid - name: Convert Markdown to HTML - run: | - npx markdown-it cool-root-doc.md --use=markdown-it-mermaid > cool-root-doc.html + run: node convert-md-to-html.js - name: Upload HTML file as an artifact uses: actions/upload-artifact@v3 with: name: html-file - path: README.html \ No newline at end of file + path: cool-root-doc.html \ No newline at end of file diff --git a/convert-md-to-html.js b/convert-md-to-html.js new file mode 100644 index 0000000..a6789c1 --- /dev/null +++ b/convert-md-to-html.js @@ -0,0 +1,17 @@ +const fs = require('fs'); +const markdownIt = require('markdown-it'); +const markdownItMermaid = require('markdown-it-mermaid').default; + +// Initialize markdown-it with the mermaid plugin +const md = markdownIt().use(markdownItMermaid); + +// Read the Markdown file +const markdown = fs.readFileSync('cool-root-doc.md', 'utf8'); + +// Convert it to HTML +const result = md.render(markdown); + +// Write the HTML output to a file +fs.writeFileSync('cool-root-doc.html', result); + +console.log('Markdown converted to HTML successfully.'); diff --git a/cool-root-doc.md b/cool-root-doc.md index d160533..29db49d 100644 --- a/cool-root-doc.md +++ b/cool-root-doc.md @@ -8,7 +8,6 @@ This document aims to summarize each task within Aave's smart contract architect - Staking. - Paraswap. - ## Core components diagram ```mermaid graph TD