Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

bendera/cheatsheet-builder

Repository files navigation

Cheatsheet builder

Boilerplate (framework?) for creating printable developer cheatsheets. See src/eleventy/cheatsheets directory for examples.

Prerequisites

  • Node.js
  • Docker

Install

Download the latest release. Run following commands in the top level directory of the project:

npm ci
bash setup-docker.sh

Start development server

npm run serve

If you want to modify the stylesheets you have to execute following command in separated terminal:

npm run serve:styles

Install custom fonts

  1. Generate an API key on the Google Fonts. Rename config.js.dist to config.js and fill with your api key.

  2. Download fonts. Ex.:

node bin/dlfonts.js Roboto 'Open Sans'
  1. Add font imports to src/styles/includes/fonts.postcss
@import url(fonts/Roboto-Black.postcss);
@import url(fonts/Roboto-BlackItalic.postcss);
/* etc. */
  1. Rebuild the container
bash setup-docker.sh

Build

And finally build your own beautiful, printable stylesheets. :) You can find the generated pdf files in the dist/pdf directory.

npm run build