Giter Club home page Giter Club logo

sprucecss-eleventy-documentation-template's Introduction


Spruce CSS

Welcome to the official documentation of Spruce Docs Elventy theme. A small template you can use to document any of your projects.


The preview image of the theme.

Github release License

A documentation template is always helpful. There are a lot of solutions to make one; we wanted to create our self-hosted version based on our favorite static site generator Eleventy.

By structure, it is simple, with two levels and additional custom templates like FAQ and Changelog.

Spruce CSS

The template is built on Spruce CSS, a small and customizable CSS framework. The main benefit of this is that you can use the Spruce UI components with dark mode and RTL support.

Features

  • Breadcrumb navigation built on 11ty Navigation Plugin.
  • HTML minification in production mode.
  • Anchor headings.
  • Table of Content.
  • FAQ template.
  • Changelog template.
  • Static search integration with pagefind.
  • Code highlighting.
  • RTL support.
  • Dark theme mode.
  • svgIcon shortcode: render any SVG icon inline and add optional classes.
  • markdownRenderer: render any string (markdown) into HTML.

Setup

  1. Clone the repository.

  2. Install the dependencies.

    In the package.json file, you will find all of the dependencies (and scripts) to install them using the following command:

    npm install
  3. Run the development mode

    To run the development mode, use the npm script. This script will also watch for changes.

    npm start
  4. Run the production mode

    Before you go live, you should use the production script to compress the Sass files.

    npm run prod

You can find some more npm scripts in the package.json that can be helpful.

Content Managment

Adding content to the template is easy as almost everything is in Eleventy.

The Basic Structure

Our base folder for the documentation pages is the posts folder. You must follow the folder structure, which means the category here. If you create a folder, you must make a list page with the same name as the folder. You must also create another posts folder under the category folder where your posts go. You must create the posts.json file that will parameter your layout and permalink values.

Eleventy Navigation

The theme utilizes the Eleventy Navigation plugin, so you must explicitly set up the hierarchy. This is needed for the automatic sidebar navigation, the navigation order, and breadcrumb generation.

Other Pages

To create simple pages, make a file directly under the src folder and configure it with the available front matter.

Structure

spruecss-eleventy-documentation-template/
├─ node_modules/
├─ dist/
├─ src/
│  ├─ _data/
│  ├─ _includes/
│  ├─ css/
│  ├─ filters/
│  ├─ font/
│  ├─ img/
│  ├─ js/
│  ├─ posts/
│  ├─ scss/
│  ├─ shortcodes/
│  ├─ transforms/
│  ├─ changelog.md
│  ├─ faq.md
│  ├─ index.md
├─ .eleventy.js
├─ package.json
├─ README.md
├─ ...
  • _data: Some global data, like the name of your site and helpers like the active navigation element or current year.
  • __includes: All of the layout and partial templates.
  • css: The compiled CSS.
  • filters: The additional filters that you can use.
  • font: The custom fonts.
  • img: The static image files.
  • posts: The markdown contents.
  • scss: The Sass files.
  • shortcodes: The available shortcodes.
  • transforms: The transformations.

Netlify Status

sprucecss-eleventy-documentation-template's People

Contributors

adamlaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.