Static Blog Generator Inspired Idea From HexoJS. because of HexoJS doesn't support 1000 posts on 8GB RAM device, i creating this project.
Walkthrough
- I switched platforms from blogger to github page.
- Using HexoJS for first time, and creating my own platform converter
Blogger to HexoJS
https://github.com/dimaslanjaka/hexo-blogger-xml - After a few months, my posts have reached 800. hexojs is starting to become unfriendly, to the point that all my articles are corrupted (not rendered perfectly). And some posts got reduced from page rank.
- And i got confused, then iam creating this project
- nodejs (12.x - 17.x supported)
- typescript (pure typescript commonjs with esmodule interop project)
- ejs engine (template renderer)
- markdown engine (using markdown-it support footnotes, sup, sub, etc)
- vscode ide integrated settings (development using vscode recommended)
- cache strategies (dont process any unmodified files to save memory usages)
- github pages deployer (merged instead clean old files to syncronize with cache strategy)
- 1000+ posts supported
- cross-platform supported (linux recommended) (android termux need c++ for packages including: jsdom, node-libcurl, imagemin, etc)
git clone --single-branch --branch compiler https://github.com/dimaslanjaka/dimaslanjaka.github.io foldername
cd foldername
git checkout compiler
mkdir tmp
npm install
src-posts/
contains all original posts with markdown formatssource/
(config.source_dir
in _config.yml) contains all pages that should be on public directory (config.public_dir
in _config.yml)- database caches on
node_modules/.cache/dimaslanjaka
before all, setup _config.yml
first
gulp --tasks # to view all tasks
gulp clean # clean cache, generated caches, tmp folder, databases
gulp copy # copy and process all src-posts to source/_posts
gulp generate # generate all source to public directory
gulp deploy # deploy to github pages
gulp server # development, render on-fly
you can pass argument --nocache
gulp generate --nocache # generate all without reading cache instead write new cache (fresh generate)
gulp server --nocache # development without reading cache, instead write fresh cache
or you can put global generator in _config.yml
generator:
cache: false # this will ignore any caching functions
Standalone: is useful for low device to run one by one the tasks. more information run: gulp --tasks
.
copy:
copy and process fromsrc-posts
toconfig.source_dir
in _config.ymlgenerate:
fromconfig.source_dir
to generated folderconfig.public_dir
in _config.yml
gulp clean # clean all caches
gulp copy:assets # copy post assets
gulp copy:posts # copy and process posts
gulp copy:remove-inline-style # remove inline style from html source/_posts (useful for migrated from blogger)
gulp copy:blogger # <series>(copy:assets, copy:posts, copy:remove-inline-style)
gulp generate:assets # copy all assets
gulp generate:template # copy and process template
gulp generate:posts # generate posts
gulp generate:sitemap # generate sitemaps
gulp generate:tags # generate tags
gulp generate:categories # generate categories
gulp generate:label # generate tags and categories
gulp generate:index # generate homepage index
gulp generate:archive # generate homepage, tags, and categories
gulp generate:feeds # generate atom, rss
gulp generate:minify # minify all html,css,js on public_dir in _config.yml
important: always run gulp clean
to prevent deleted files on origin repository JamesIves/github-pages-deploy-action#1070
https://askubuntu.com/questions/64095/change-xampps-htdocs-web-root-folder-to-another-one https://stackoverflow.com/questions/7337724/how-to-check-whether-mod-rewrite-is-enable-on-server https://stackoverflow.com/questions/10878284/virtual-hosts-xampp-linux-ubuntu-not-working
- admin panel
- template
- archives generator
- multiple type of sitemap (google news, sitemap text, sitemap html, sitemap xml)
- [email protected]
- whatsapp +6285655667573
- nodejs static blog generator
- nodejs termux static blog generator
- nodejs simple static blog generator