All Projects → rls-moe → Jmmasw

rls-moe / Jmmasw

Licence: mpl-2.0
Just make me a static website

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Jmmasw

Assemble
Community
Stars: ✭ 3,995 (+30630.77%)
Mutual labels:  static-site-generator, static-site, generator, templates
dry
Dry is a new template engine and language, and is a superset of Shopify's Liquid, with first-class support for advanced inheritance features, and more. From the creators of Enquirer, Assemble, Remarkable, and Micromatch.
Stars: ✭ 66 (+407.69%)
Mutual labels:  templates, templating, static-site
Gridsome Portfolio Starter
A simple portfolio theme for Gridsome powered by Tailwind CSS v1
Stars: ✭ 329 (+2430.77%)
Mutual labels:  static-site-generator, static-site
Django Bakery
A set of helpers for baking your Django site out as flat files
Stars: ✭ 360 (+2669.23%)
Mutual labels:  static-site-generator, static-site
Generator Infinitely Static
💫 Static page generator with routes support thats infinitely awesome
Stars: ✭ 11 (-15.38%)
Mutual labels:  static-site-generator, static-site
Publii
Publii is a desktop-based CMS for Windows, Mac and Linux that makes creating static websites fast and hassle-free, even for beginners.
Stars: ✭ 3,644 (+27930.77%)
Mutual labels:  static-site-generator, static-site
Yo
CLI tool for running Yeoman generators
Stars: ✭ 3,421 (+26215.38%)
Mutual labels:  generator, templates
Charge
⚡️ An opinionated, zero-config static site generator.
Stars: ✭ 368 (+2730.77%)
Mutual labels:  static-site-generator, static-site
simply-static-deploy
WordPress plugin to deploy static sites easily to an AWS S3 bucket.
Stars: ✭ 48 (+269.23%)
Mutual labels:  static-site-generator, static-site
Staticgen
Static website generator that lets you use HTTP servers and frameworks you already know
Stars: ✭ 628 (+4730.77%)
Mutual labels:  static-site-generator, static-site
Static Site Generators
A definitive list of tools for generating static websites.
Stars: ✭ 553 (+4153.85%)
Mutual labels:  static-site-generator, static-site
Headlesscms.org
Source for headlesscms.org
Stars: ✭ 628 (+4730.77%)
Mutual labels:  static-site-generator, static-site
Skeleventy
A skeleton boilerplate built with Eleventy.
Stars: ✭ 318 (+2346.15%)
Mutual labels:  static-site-generator, static-site
Grips
Simple-logic templates
Stars: ✭ 289 (+2123.08%)
Mutual labels:  templates, templating
Mikado
Mikado is the webs fastest template library for building user interfaces.
Stars: ✭ 323 (+2384.62%)
Mutual labels:  templates, templating
Verless
A simple and lightweight Static Site Generator.
Stars: ✭ 276 (+2023.08%)
Mutual labels:  static-site-generator, static-site
Forty Jekyll Theme
A Jekyll version of the "Forty" theme by HTML5 UP.
Stars: ✭ 695 (+5246.15%)
Mutual labels:  static-site-generator, static-site
TechFusionFM
Static site for tech podcast built using Hexo.io with deployment script, XML escaper and iTunes rank tracking Telegram bot.
Stars: ✭ 20 (+53.85%)
Mutual labels:  static-site-generator, static-site
11tyby
Simple 11ty setup using TypeScript, SASS, Preact with partial hydration, and other useful things. Aims to provide the DX of Gatsby, but using 11ty!
Stars: ✭ 38 (+192.31%)
Mutual labels:  static-site-generator, static-site
Vim Colortemplate
The Toolkit for Vim Color Scheme Designers!
Stars: ✭ 535 (+4015.38%)
Mutual labels:  generator, templates

Just Make Me A Static Website

JMMASW is a simple tool for a simple problem: Static Websites.

Operation

  1. Load all files with the extension ".html" or ".tmpl"
  2. Parse every file into a Go Template
  3. Load the data file ("./data.json" per default)
  4. Run all templates with a name that ends in ".html"
  5. Write the output to files unless it's empty

Usage

JMMASW accepts the following commandline parameters:

  • data - Location of the data file
  • dir - Project location, default is current directory
  • static-out - Output directory, default is ./jasw-out (For "Just a static Website Out")
  • ignore-no-data - Defaults to true. If set to false then a missing data file results in termination of the program

Building

JMMASW is built using Go1.8, so you should at minimum install Go1.8 for this to work but older versions might work too (but no promises)

To install simply run the following commands:

go get go.rls.moe/jmmasw
go install go.rls.moe/jmmasw

Templates

For Information on the Template format, refer to the godoc entries on html/template and text/template.

Templates are defined by their filename but if you manually defined templates this does not apply.

Only templates with a name that ends in ".html" will be rendered, ".tmpl" files will only be parsed and are intended for common functionality.

Template Functions

  • file accepts a single string as parameter and attempts to read the specified file form the file system
  • json parses a given string into json format, the top-level structure must be a map, simple arrays are not permitted
  • markdown renders a given string into HTML using Markdown Processors without any sanitization (don't use on user inputs!)
  • dict accepts any number of key-value pairs with a string-typed key and returns the result. This allows to combine several variables into a single pipeline

Roadmap

  • Include Markdown Parser and Markdown File Loader
  • Function to parse additional .json files from within the templates
  • Method to ignore specific directories
  • Function to output files that aren't present as templates
    • Example: index.html generates index-en.html and index-de.html instead of index.html

Wait what?

If you're wondering why this tool exists: I made it so I can generate my website for multiple languages without having to copy-paste half the website all the time.

I considered Hugo, which is an excellent static page generator but it is also way too complicated for this application. JMMASW works with "raw" HTML templates and makes no assumption about your website.

You can take your website as it is now and provided it doesn't contain invalid go-template code, it will come out the other end of JMMASW without a change.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].