-
Notifications
You must be signed in to change notification settings - Fork 2
Writing Pages
To create a new file, simply click on the "New" button in the header, give the page a title and customize the file name if you wish, then click "Create". You can specify the full path to the file, so if you wish to create a file named diary/2016/november/20th.md
, simply put exactly that in the filename field. If you are currently viewing a file in a subdirectory, Repositorium will suggest to create the file in that folder.
Any subdirectories that don't yet exist will be created for you.
Repositorium ships with a powerful online editor called CodeMirror that supports Markdown as well as a lot of programming languages. Which editor mode will be used is determined by looking at the filename extension, but you can also change the editor mode with the dropdown list on the right side. This will not affect how the page will be displayed after you made your edit, though.
When you have edited a page, you can customize the commit message and then click on "Save" to save the changes. Repositorium will save the file and automatically stage and commit it into your repository.
Repositorium supports YAML frontmatter, a concept borrowed from Jekyll. This frontmatter will not be displayed, but will be parsed by Repositorium and used for different purposes. In Markdown files (files with the filename extension .md
), simply put a block of YAML-formatted key-value pairs between two lines containing three or more dashes at the beginning of the file, like this:
---
title: My Awesome Custom Title
description: This is a one-sentence description of the contents of this page.
contributors:
- John Doe
- Mike Miller
---
# The actual page starts here.
You can specify any keys you want, but Repositorium will pay special attention to the following keys:
-
title
: You can specify a custom title for the document. If you don't, the HTML title tag will be filled with the first level-one heading Repositorium can find (if the file is a Markdown file), or the filename otherwise. -
description
: The "description" metatag will be filled with the value of this key. -
keywords
: Likewise, you can specify a comma-separated list of keywords that will be used for the "keywords" metatag. -
author
: If given, this field will be used for the "author" metatag. -
sidebar
: You can display a custom sidebar file for a document by specifying the path of a file in your repository here. -
language
: You can specify what language the content of the document is in (for exampleen
orde
). The value of this key will be used in the<html lang="XYZ">
tag. If you don't specify a language, Repositorium will use the value specified insrc/configuration.php
. Specifying the correct content language is important, e.g. for hyphenation.