Skip to content
This repository has been archived by the owner on Feb 2, 2020. It is now read-only.

CodeForBaltimore/KnowYourRightsBaltimore

Repository files navigation

Know Your Rights Baltimore

You have a documentation. I turn them into a website. Any questions?

Welcome to Grundgesetz. It's a skeleton for generating accessible documentation pages built on top of Gatsby. It creates static pages from your Markdown documentation files, all prettily formatted with a easy-to-use layout.

Grundgesetz is initially built to solve internal issues in managing documentation for our products at Kata.ai, but at the same we also found out that it's a good base for quickly deploying a documentation site online, so we put this up for everyone to use.

Just Your Docs

Grundgesetz is set up for you to get up and running straight away. All your docs are written in Markdown and go inside the /docs folder. The table of contents is managed through a JSON file.

It will generate permalinks based on the directory tree, but you can override it anytime by setting a permalink frontmatter.

Instantly Deployable

Have an instance of Grundgesetz set up on GitHub? You can easily deploy it using the built-in deploy task. You can also set up a continuous deployment pipeline for hosting providers like Netlify.

Blazing Fast

Grundgesetz is built on top of Gatsby, a blazing-fast static site generator for React. Want to learn more about Gatsby? Click here.

Also, putting the words "blazing fast" into any project's README seems to attract a lot of folks lately.


Geting Started

Prerequisites

  • Node.js (8.0.0+)
  • Yarn (Optional. You can still use npm if you want, but this is for your own sanity.)

Initializing the Project

The Fast Way

You can now create a new repository with Grundgesetz included by going to the GitHub page clicking on the "Use this template" button on the top right.

use-template

This will take you to the Create Repository screen. Fill in the details of your projects, and click "Create repository from template".

new-repo-from-template

Once the repository is created, you can clone the repository and open your terminal in the repository's folder. Once you're there, install the dependencies by running yarn (or npm install, if you prefer to use npm).

Using Gatsby CLI

Alternatively, you can bootstrap your project using gatsby-cli. To install it, run the following command.

# npm
npm install -g gatsby-cli
# yarn
yarn global add gatsby-cli

Now we have gatsby-cli installed, we can now create a project based on the Grundgesetz skeleton by running:

gatsby new project-name https://github.com/kata-ai/grundgesetz-skeleton

The project is generated in the folder with the project-name you specified. In the next section, we will start writing our documentation on-the-fly with the development server.

Running the server

Now that we have the project set up, let's cd to the generated project. Here we'll have to install our node dependencies. To do so, run the following command.

# npm
npm install
# yarn
yarn

To start working on our documentation, we need to start a development server.

# npm
npm dev
# yarn
yarn dev

The command above will start a development server with hot-reloading capabilities on localhost:8000. From now on, you can start writing your documentation with ease. In the next section, we will learn how to build your pages and deploy them.

Credits

Built with Gatsby - the blazing-fast static site generator for React.

Authors

About

2019 National Day of Civic Hacking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published