hrbigelow / md-to-webpage

Compile a markdown file exported from Jupyter to a webpage. Supports syntax highlighting of code blocks and inline or block math mode using Katex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

md-to-webpage is a tool for turning Markdown code with embedded math and syntax-highlighted code blocks into a webpage.

Quick Start

This assumes you have a path/to/notebook.ipynb that you want to turn into a webpage.

git clone https://github.com/hrbigelow/md-to-webpage
cd md-to-webpage/esbuild-plugin-markdown
node build.js
cd md-to-webpage
npm install -D ./esbuild-plugin-markdown
npm install
jupyter nbconvert --to markdown path/to/notebook.ipynb --output content.md

# This will build www/main.js and www/main.js.map
# Will output the localhost:port where you can view your webpage
# To deploy, copy www to a webserver
node script.mjs

By default, this includes python and bash code blocks. See main.js to add more.

About

Compile a markdown file exported from Jupyter to a webpage. Supports syntax highlighting of code blocks and inline or block math mode using Katex


Languages

Language:JavaScript 49.6%Language:CSS 16.9%Language:Jupyter Notebook 13.5%Language:HTML 11.3%Language:TypeScript 8.8%