3.0.1 • Published 12 months ago

static-blog-generator v3.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

SBG (Static Blog Generator) NodeJS Project

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

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

project information

webmanajemen.com Join the chat at https://gitter.im/static-blog-generator/discussions npm version Npm package yearly downloads Minimum node.js version GitHub repo size GitHub last commit

NameURLCoverageCI
StableDownload--
DevelopmentGitHubDeepScan gradeDev Build Dev Tests

Project active and used at https://github.com/dimaslanjaka/static-blog-generator-hexo as Post Processor and GitHub Site Deployer. Site result at https://github.com/dimaslanjaka/dimaslanjaka.github.io

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

Requirements

  • linux recommended (used default c++)
  • windows need msvs [read gist]
  • android termux need c++
pkg install clang -y
# or
pkg install g++

Project Installation

Install using npm recommended.

# install global packages
npm i -g npm gulp-cli typescript ts-node
# clone
git clone https://github.com/dimaslanjaka/static-blog-generator.git foldername
# cd
cd foldername
# fetch all submodules
git submodule update --recursive --remote
# delete posts (don't copy my articles)
rm -rf src-posts/*
# create required folder
mkdir tmp themes
# install dependencies
npm install

installing development

npm i -D https://github.com/dimaslanjaka/static-blog-generator/raw/master/release/development.tgz

project structure

folder namedescription
src-postscontains all original posts with markdown formats (ejs shortcodes supported)
source(config.source_dir in _config.yml) contains all pages that should be on public directory (config.public_dir in _config.yml)
node_modules/.cache/dimaslanjakadatabase caches

Project Configuration

View Full Documentation

command line

See Documentation static-blog-generator CLI

Github Action

~important: always run gulp clean to prevent deleted files on origin repository https://github.com/JamesIves/github-pages-deploy-action/discussions/1070~

PHP Local Server

References

Troubleshoot

  • css and js files not found

    bypass using .nojekyll It is now possible to completely bypass Jekyll processing on GitHub Pages by creating a file named .nojekyll in the root of your pages repo and pushing it to GitHub. This should only be necessary if your site uses files or directories that start with underscores since Jekyll considers these to be special resources and does not copy them to the final site.

todo

  • admin panel
  • download external images to local
  • GUI
  • template
  • archives generator
  • multiple type of sitemap (google news, sitemap text, sitemap html, sitemap xml)

contacts

  • dimaslanjaka@gmail.com
  • whatsapp +6285655667573

incoming terms

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

Other Packages

hexo-post-parser

npm version Npm package yearly downloads Minimum node.js version GitHub repo size GitHub last commit

google-news-sitemap

npm version Npm package yearly downloads Minimum node.js version GitHub repo size GitHub last commit

hexo-adsense

npm version Npm package yearly downloads Minimum node.js version GitHub repo size GitHub last commit

hexo-seo

npm version Npm package yearly downloads Minimum node.js version GitHub repo size GitHub last commit

hexo-blogger-xml

npm version Npm package yearly downloads Minimum node.js version GitHub repo size GitHub last commit