wiki-deploy — Build and deploy the public site¶
Use this skill to turn the wiki/ vault into a polished public site on Netlify.
Prerequisites (assumed set up already)¶
site/mkdocs.ymlexists with Material theme + mermaid2 plugin (securityLevel: loose).scripts/sync_wiki_to_mkdocs.pyexists and rewrites Obsidian wikilinks.- Python deps installed:
mkdocs-material,pymdown-extensions,mkdocs-mermaid2-plugin,pymupdf4llm. netlify.tomlat project root with correct build command + publish dir.
Build steps¶
1. Sync wiki → docs¶
The script copies everything in wiki/ to site/docs/ and rewrites [wikilinks](# "Broken wikilink: wikilinks") into MkDocs-compatible relative links. Preserves site/docs/javascripts/ (MathJax config) across runs.
2. Build statically¶
--strict flags broken links. Investigate any warning before deploying.
Output lands in site/site/. Expected: index.html, 404 page, assets/, javascripts/, one directory per section (papers/, concepts/, methods/, etc.).
3. Local preview (optional but recommended)¶
Open http://127.0.0.1:8000. Checks to run:
- Home page loads with all 6+ nav tabs.
- A paper page with LaTeX renders cleanly (e.g. /papers/price-impact-order-book-events/ should show the OFI formula typeset, not raw \(...\)).
- The mindmap page (/mindmaps/market-microstructure/) renders all three Mermaid diagrams.
- Clicking a node in the flowchart navigates to the target page.
- /schema/ shows the CLAUDE.md reproduction.
Deploy options¶
Option A — Netlify drag-and-drop (fastest, no git)¶
- Open https://app.netlify.com/drop.
- Drag the folder
arxiv-second-brain/site/site/(the build output) onto the drop zone. - Netlify assigns a URL (or updates the existing one if you're logged in).
- Rename the site in "Site settings → Change site name" if desired.
Current public URL: the https://<owner>.github.io/second-brain/ after GitHub Pages deploy — see the repo's Pages settings for the exact URL.
Option B — Git-connected Netlify (auto-deploy on push)¶
- Ensure project is a git repo with sensible
.gitignore(ignoresite/docs/,site/site/,raw/papers/*.pdf). - Push to GitHub / GitLab.
- In Netlify: "Add new site → Import from Git" → select repo. Netlify reads
netlify.tomland builds on every push. - Netlify's build command runs
mkdocs buildfromsite/but does NOT runsync_wiki_to_mkdocs.py. Either: - Prepend
python scripts/sync_wiki_to_mkdocs.py &&to the build command innetlify.toml, OR - Commit
site/docs/and skip the sync at build time (less clean but simpler).
Troubleshooting¶
- Equations render as raw LaTeX: check that
site/docs/javascripts/mathjax-config.jsloads BEFORE MathJax CDN inmkdocs.ymlextra_javascript, and that it uses only\\(...\\)/\\[...\\]delimiters (no$/$$— those conflict with arithmatexgeneric: true). - Mermaid diagrams don't render: check
mermaid2plugin is listed inmkdocs.ymlplugins and Mermaid version ≥ 10.x (formindmaptype support). - Click on diagram node does nothing: the
mermaid2plugin config must includearguments: { securityLevel: loose }. Mermaid defaults tostrictwhich silently blocksclickdirectives. - Dev server shows old content after sync: kill and restart
mkdocs serve— it occasionally caches.netstat -ano | grep :8000thentaskkill //F //PID <pid>.
After deploy¶
Update wiki/log.md with a deploy entry: