Git Product home page Git Product logo

kevlar's Introduction

Kevlar v2

An utterly simple and fast Static Site Generator built using C

  • [✅] Simple and fast
  • [✅] HTML-first approach
  • [✅] Crossplatform (Tested on Windows 11 v21H2 and Debian GNU/Linux 11 x86_64)
  • [❌] JS-first SPA experience
  • [❌] Frameworks and external build tools
  • [❌] Plugins and lifecycle hooks

Install

To get kevlar, you can either get a binary from releases or build from scratch; instructions for which are given here.

To get start with kevlar, you need GCC and make which are the primary build tools used by kevlar

unix-like

build

git clone https://github.com/aadv1k/kevlar
cd kevlar && make all
./bin/kevlar help

windows

You may need something like mingw32-make, and gcc for windows for this to work

git clone https://github.com/aadv1k/kevlar
cd kevlar && make kevlar_win32
"bin/kevlar.exe" help

Recipes

Kevlar has it's own markdown loader if you would like to build it as it's own executable you can run make md2html You can build the loader kevlar uses to parse .md files as their own executables by running.

You will get the respective CLI

CLI

$ kevlar
kevlar <cmd> <opt>
  help       -- print this help message
  new        -- create a new site skeleton
  new-post   -- create a new post with defaults
  build      -- build if in a kevlar project

kevlar new <NAME>

Sets up a basic skeleton for a site and a basic config.ini

theme=listing-kevlar-theme
  • theme=: looks for the given theme within the ./templates/ dir.

kevlar new-post <TITLE>

Generates a .md file in the current folder with the following archetype

Title=This is a title
Date=2023-01-24 17:44:10
Order=1
  • Title: the name of the link that will show up with --TITLE--
  • Date: current date, put AS-IS with --DATE--
  • Order: the order in which the post will show up in --LISTING--

Config

the only required config is the theme option in the config.ini files.

Templating

*.html

Tags Description
--HEADER-- Reads and parses header.html in your theme
--FOOTER-- Reads and parses footer.html in your theme
--SCRIPT ./script.js-- Finds the provided file within yout theme and inserts an inline script
--STYLE ./style.css-- Finds the provided file within yout theme and inserts an inline style
--CUSTOM_TAG-- will look up the tag (lowercase) in config.ini, where you can provide the option for this tag

post.html

Defines the layout of a post

Tags Description
--CONTENT-- The parsed markdown content

entry.html

Defines to how a singular list item within --LISTING-- will look like

Tags Description
--DATE-- The Date= option in the post file
--PATH-- Html link of the parsed post
--CONTENT-- parsed html content

index.html

Tags Description
--LISTING-- provides a list of all posts based on entry.html

kevlar's People

Contributors

aadv1k avatar

Stargazers

Galladite 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.