Giter Site home page Giter Site logo

yabs's Introduction

YABS

The surprised and appalled sound ones makes learning that there is "Yet Another Build System".

Synopsis

YABS is a highly customizable system for creating build pipelines for static websites. Although it is inspired by systems like Pelican, Sphinx and Lektor, it works at a somewhat lower level, providing a maximum of flexibility to end users while eliminating elements like a stiff, complex content management engine. YABS is intended to provide a thin layer - a Python wrapper - around a number of popular tools for building static websites, allowing to rapidly build just about anything ranging from small single page sites to large and complex blogs.

Design

YABS is based on a minimal plugin system core: Every piece of build functionality is isolated into individual plugins, which can be chained up into custom pipelines and configured in project-specific configuration files. If a certain functionality is not provided by an existing YABS plugin, it is trivial to write your own and add it to the system. Every plugin is a stand-alone Python module exposing one single method which must accept two things - a project context object and an options parameter. If a certain plugin happens to be too slow for a certain use case, it can easily be optimized without interfering with other functionality.

Features

YABS currently offers plugins for the following common [static] website build steps:

  • a cleanup routine, plowing the ground for new builds
  • a templating engine (thin wrapper around Jinja2)
  • a markdown processor (extended mistune)
  • a data loader for YAML & JSON data (exposing data to the templating engine)
  • a slugifier (turning headlines into valid IDs and filenames)
  • building & embedding interactive plots with plotly and bokeh
  • syntax highlighting (rendered at build time)
  • math & formulas (rendered at build time)
  • code compression (HTML, CSS)
  • code obfuscation / minimization (JavaScript)
  • code transpilers (between different versions of JavaScript; from SASS/SCSS to CSS)
  • code validation (HTML)
  • inclusion of third party libraries (JavaScript, CSS)
  • processing of font files
  • processing of image files
  • static file repository
  • a favicon generator
  • a robots.txt generator
  • a sitemap.xml generator
  • a htaccess generator
  • a HTTP server for testing
  • a symlink creator
  • content deployment based on sshfs/sftp

If it is required to repeatedly run a small subset of a build pipeline e.g. for debugging, it is perfectly possible to do so.

Installation

  1. Check out the latest source code of YABS from its git repository: git checkout [...]
  2. Change into the source folder of YABS: cd yabs
  3. Create a new empty virtual environment named env with Python 3.8 or better: python3 -m venv env
  4. Install YABS: make install
  5. Activate the virtual environment: source env/bin/activate

Basic usage

At a project root, first create a site.yaml configuration file. Once this has been done, you can use the following commands:

# Run the entire pipeline
yabs build
# Run a list of space-separated plugins
yabs run [plugins]
# Start the HTTP server
yabs server start
# Stop the HTTP server
yabs server stop
# Deploy the latest build to a pre-configured target
yabs deploy [target]

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.