GithubHelp home page GithubHelp logo

hoast / hoastig Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 405 KB

Static page generator using hoast with front matter extraction, templating with markdown handlebars, and file minification.

Home Page: https://hoast.js.org

License: ISC License

JavaScript 100.00%
hoastig static-page-generator website-generator

hoastig's Introduction

Project logo

Hoast

A set of simple and modular packages for build automation.

Creating a static page generator can be incredibly easy! Create the following configuration file in the root of your project, install the used dependencies and run the hoast command to start a build.

export default {
  options: {
    directory: 'src',
  },
  collections: [{
    source: ['@hoast/source-readfiles', {
      directory: 'pages',
    }],
    processes: [
      '@hoast/process-frontmatter',
      '@hoast/process-markdown',
      ['@hoast/process-handlebars', {
        templateDirectory: 'layouts',
        templatePath: 'default.hbs',
      }],
      ['@hoast/process-writefiles', {
        directory: '../dst',
      }],
    ],
  }],
}

Configuration files can have many forms JSON, JavaScript objects, Hoast instances, or use the API directly and call the process function to start building.

Architecture

There is one core package that controls what and when the modules are run as well as the data provided to them. What modules should run in what order can be controlled using a configuration file or directly through code.

This repository contains the core package as well as first party modules and everything directly surrounding the project. For example all the packages can be found in packages directory, the website's source code can be found in the .docs directory and the build of the website is in the docs directory.

Made with

The following list are project that are build with this project.

The following list serve as tools you can use directly, or as an example on how to make a solution that fits your needs.

  • examples - Examples on how Hoast and several modules can be used.

Packages

  • hoast - The core package of hoast responsible for managing and running the other packages. See this package for more information on how to create a config file.

Source packages

  • source-custom - Allows you to provide your own custom source functions. Extends base-source where the overridable functions can be provided via the options. Helps you from having to create a package for simple one-off behaviour.
  • source-airtable - Read data from Airtable bases.
  • source-javascript - Read and execute script from the filesystem.
  • source-readfiles - Read files from the filesystem.

Process packages

Developer packages

  • base-package - Provides basic functionality like receiving the library's reference and setting up a logger.
  • base-process - Provides basic functionality for process package like an initialization function, sequentially running of certain code, and filtering out running the process based of the data.
  • base-source - Provides basic functionality for source package like an initialization function, sequentially running of certain code, and a finallize function called after the source is done iterating.
  • utils - A package of utility functions used by several other packages in this list.

hoastig's People

Contributors

redkenrok avatar

Watchers

 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.