Installation

How to start crafting documentation with LibDoc.

Online - Remote theme

Available only on GitHub, remote theme feature is the most simple way to use LibDoc, it does not require any installation, just follow these few steps:

  1. Create a repository
    Just add a new repository on your GitHub account. Example
  2. Create a LibDoc config file
    Create and configure your LibDoc config file called _config.yml, required for GitHub Pages, do not forget to add/uncomment the following line:
    remote_theme: olivier3lanc/Jekyll-LibDoc
    View a _config.yml example
  3. Enable Github Pages
    To automatically compile your LibDoc project, just enable GitHub Pages at https://github.com/[GH_USER_NAME]/[REPO_NAME]/settings/pages. Each time you commit and push on the specified branch, Github Pages builds and hosts your project on the URL https://[GH_USER_NAME].github.io/[REPO_NAME].

Your repository is now ready to be deployed as GitHub Pages website, all you have to do is adding your content! Learn more about remote themes

Online - Copy or clone

Github.dev

It is possible to craft documentation with LibDoc only with your browser, Github and Github Pages.

  1. Copy, clone or fork LibDoc repository
  2. On the forked/copy repository, press Shift + . or go to https://github.dev/[GH_USER_NAME]/[REPO_NAME]/tree/[BRANCH_NAME]
  3. You are now into Visual Studio Code and you can edit, commit and push.

To automatically compile your LibDoc project, just enable your instance on this page https://github.com/[GH_USER_NAME]/[REPO_NAME]/settings/pages. Each time you commit and push on the specified branch, Github Pages builds and hosts your project on the URL https://[GH_USER_NAME].github.io/[REPO_NAME].

Locally

LibDoc requires only Jekyll to compile your work.

  1. Install Jekyll on your machine following the steps described here
  2. Get the latest version of LibDoc
  3. Into the folder where LibDoc was copied, adjust your settings of your YAML file, Most important are
    • url
      The host of your local set up, this can be for example http://localhost or http://192.168.1.2 or domaine name
    • baseurl
      The path to your local copy of LibDoc. For example /Jekyll-LibDoc/_site
    • title
      Title of the documentation
    • description
      Description of your documentation project
  4. Compile your project using:
    • jekyll build
      Builds the project using _config.yml
    • jekyll build -c _personal-config.yml
      Builds the project using _personal-config.yml
    • jekyll build -c _personal-config.yml --watch
      Builds the project using _personal-config.yml and automatically compiles on detected changes.
    • Learn more about command line usage on official Jekyll documentation

Local with remote theme

View example repository

It is possible to only write your content without complete LibDoc installation, just use LibDoc as remote theme. You only need to use locally Jekyll remote theme plugin

  1. Install Jekyll on your machine following the steps described here
  2. Add a Gemfile with the following line
     gem "jekyll-remote-theme"
    

    and run bundle install to install the plugin

  3. Add the following to your LibDoc’s local config file _config-local.yml

     remote_theme: olivier3lanc/Jekyll-LibDoc
     plugins:
         - jekyll-remote-theme
    
  4. Run jekyll build or with any custom config file jekyll build -c _your-own-config.yml

Feel free to use the example repository as starter template.