The docs layout is ideal for documentation pages and follows the document style on GitHub Docs.
To use the Docs layout in your Jekyll site, create a new file in your _docs collection with the following front matter:
---
title: Your Documentation Title
layout: docs
---
Add the following to your _config.yml:
collections:
docs:
output: true
sort_by: order
defaults:
- scope:
path: "" # an empty string here means all files in the project
type: "docs"
values:
layout: "docs"
image: /assets/img/default.png # The default image used for social and posts.
permalink: /docs/:path
show_edit_url: true
toc: true
By default, the theme builds the edit link from site.repository and points to the current document path on the main branch.
If you need a different repository, branch, or base path, you can override it:
defaults:
- scope:
path: ""
type: "docs"
values:
edit_url: "https://github.com/{user}/{repo}/edit/{branch}"
You can hide the edit link entirely:
defaults:
- scope:
path: ""
type: "docs"
values:
show_edit_url: false
toc: true)order front mattersite.repositoryshow_edit_url: falseedit_url when needed_docs folderorder front matter to control the sorting of your documentation pagestoc option automatically generates a table of contents for each pageshow_edit_url can be set globally or per pageedit_url is optional and only needed when the generated GitHub edit link is not the right target