Giter VIP home page Giter VIP logo

dimaslanjaka.github.io's Introduction

SBG (Static Blog Generator) Project

Static Blog Generator Inspired Idea From HexoJS. because of HexoJS doesn't support 1000 posts on 8GB RAM device, i creating this project.

Walkthrough

Project Walkthrough

  • I switched platforms from blogger to github page. image
  • 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

compiler information

webmanajemen.com Build

features

  • 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)

Installation

git clone --single-branch --branch compiler https://github.com/dimaslanjaka/dimaslanjaka.github.io foldername
cd foldername
git checkout compiler
mkdir tmp
npm install

project structure

  • src-posts/ contains all original posts with markdown formats
  • source/ (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

runner

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

no cache

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

Standalone: is useful for low device to run one by one the tasks. more information run: gulp --tasks.

  • copy: copy and process from src-posts to config.source_dir in _config.yml
  • generate: from config.source_dir to generated folder config.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

Github Action

important: always run gulp clean to prevent deleted files on origin repository JamesIves/github-pages-deploy-action#1070

PHP Local Server

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

todo

  • admin panel
  • template
  • archives generator
  • multiple type of sitemap (google news, sitemap text, sitemap html, sitemap xml)

contacts

incoming terms

  • nodejs static blog generator
  • nodejs termux static blog generator
  • nodejs simple static blog generator

dimaslanjaka.github.io's People

Contributors

dependabot[bot] avatar dimaslanjaka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.