The Cheatsheet discusses management commands for daily use. The Template system J1 is a creation tool to build simple but fully configurable modern static websites using the generator Jekyll. No deep knowledge of using Jekyll is needed for the template system J1.
J1 Template provides a handy command, j1, to manage and run websites created by Jekyll One. All commands supported are listed below.
| | The command j1 is a wrapper around the top-level scripts defined in the NodeJS project file package.json. To run a J1 project, an installation of NodeJS is required. |
A typical first run to get a new website up and running looks like this:
j1 generate my-website
cd my-website
j1 setup
j1 site
| | Except for j1 generate and j1 help, all commands must be started from inside a project folder. The folder you are in must be a J1 project, and the project must have been prepared with j1 setup before. If not, the command stops with an error message. |
Table 1. Project Management commands | Command | Description | Example |
| Runs the website of a J1 project as a standalone web application. Unlike the command j1 site, the web application does not use Jekyll to serve the website. The application uses the web server Puma and takes the files from the web root folder _site inside the project. | | | To run a project as a standalone web application, a previous setup is required to serve the site out of the _site folder. | |
| Creates a J1 project scaffold in the folder <project name>. Once the scaffold has been created, change into that (project-)folder and run j1 setup to make the project ready to use. -
--force — create the project even if the folder already contains files -
--skip-bundle — do not install the Ruby GEM files after the scaffold was created -
--skip-patches — do not install the patches that come with J1 -
--system — install the Ruby GEM files in the system gem folder instead of the user folder ~/.gem | j1 generate <project name>
|
| Shows the help message, optionally for a given subcommand (e.g. generate). | |
| Installs the patches available for a J1 project. By default, patches are installed for the current user in the users gem folder ~/.gem. See more details by running j1 help patch. | | | Patches are only needed on the Windows platform and are installed automatically when a project is being generated. On Linux or OSX platforms, the installation of patches is skipped. | |
| Rebuilds all sources of a project. If you run a website in development mode (j1 site), most changes of your content (sources) are detected automatically and rebuilt for you. | | | Fundamental changes of the configuration, like the site config _config.yml (Jekyll), affect the base settings of your website. In this case, a rebuild is required to apply those changes. | |
| Resets a J1 project to factory state. A reset removes all project related files, but all sources of your website stay untouched. After a reset, run j1 setup again to make the project ready to use. | |
| Prepares a J1 project scaffold for first use. Managing a J1 site requires NodeJS libraries and a larger number of Ruby GEM files (Ruby libraries) to be installed and initialized. -
--force — install the patches even if they are already installed -
--skip-patches — do not install the patches that come with J1 -
--system — install the Ruby GEM files in the system gem folder instead of the user folder ~/.gem | | | Be patient. The first setup downloads a lot of files and may take a while to finish. | |
| Runs the website of a J1 project in development mode. For development, the site generator of Jekyll runs in the background to detect changes of your website sources. | | | The generator of Jekyll runs in incremental mode and rebuilds modified source files automatically. If the base configuration of a website is changed, a rebuild of the website is required. See command rebuild for more details. | |