Sample Static Blog, Tags. A barebones header, replace me!

Export Static Blog

2021/4/6 20:58

Install Node.js and Tiddlywiki

follow the guide : https://tiddlywiki.com/#GettingStarted%20-%20Node.js

Example Batch File

see https://github.com/welford/twstaticblog/tree/master/example/export-basic.bat

rd .\temp\blog-basic /s /q
call tiddlywiki --load .\example.html --savewikifolder .\temp\blog-basic
XCOPY /E /I /Y .\tw-basic .\temp\blog-basic
call tiddlywiki .\temp\blog-basic --output .\blog-basic --build css
call tiddlywiki .\temp\blog-basic --output .\blog-basic --build framework
call tiddlywiki .\temp\blog-basic --output .\blog-basic --build tag
call tiddlywiki .\temp\blog-basic --output .\blog-basic --build posts
call tiddlywiki .\temp\blog-basic --output .\blog-basic --build index
rd .\temp\blog-basic /s /q
  1. Delete ./temp/blog-basic incase it is not empty
  2. Export the local tiddlywiki, in this case example.html, as a wikifolder to ./temp/blog-basic
    1. see https://tiddlywiki.com/#TiddlyWikiFolders for full details
  3. copy ./tw-basic/ folder to ./temp/blog-basic
    1. This lets us override any settings in the original exported wiki
    2. Crucially it contains the export part of the plugin
  4. Load the temp wiki folder and export css to .\blog-basic
  5. Load the temp wiki folder and export framework pages to .\blog-basic
  6. Load the temp wiki folder and export tag pages to .\blog-basic
  7. Load the temp wiki folder and export posts pages to .\blog-basic
  8. Load the temp wiki folder and export index pages to .\blog-basic
  9. delete ./temp/blog-basic

Styled Example

see https://github.com/welford/twstaticblog/tree/master/example/export-styled.bat

exports temp to .\temp\blog-styled and final data to .\blog-styled

uses .\tw-styled to override the tyles in this wiki