-
Notifications
You must be signed in to change notification settings - Fork 0
Edit Content
Pages are located in the pages directory of this website.
They follow the automatic localization rules.
Most of the time, for a normal page, you want to use layout: page in the front matter.
A gallery is a page containing arbitrary content at the top and a masonry image gallery at the bottom.
An gallery page uses a single directory (preferably a subdirectory in /assets/static/img/galleries).
Add the following to the front matter of a page to turn it into a gallery:
layout: gallery
gallery_path: "/assets/static/img/galleries/XYZ"A redirection can be created by using the redirection layout in combination with a destination in a page's front matter.
The file that is created by jekyll will redirect the user to the given location.
For example, a File in /dashboard/content/index.html will redirect domain/dashboard/content to domain/en/dashboard#home:
layout: redirection
destination: /en/dashboard/#/homeThe permalink option can be used to specify the source of the redirection by setting the location of the generated file.
In most cases this redirection will replace the served page in the browser history and act similarly to a 30X redirection. For further information see the development documentation.
Navbar entries are defined in _data/XX/nav.yml under the top key.
The pages array defines entries that appear in the left of the navbar:
- name: Top Entry
link: /permalinkThese entries may be nested one layer deep to create a menu that opens when clicked.
- name: Top Entry
entries:
- name: Second Level Entry
link: /permalinkSpecial pages under the special_page key represent icon buttons in the right part of the navbar:
- name: Search
icon: "search"
link: /en/searchPossible icon values are all icons from the free solid subset of the Font Awesome icon set.
Calendar entries are defined within _data/XX/calendar.yml under the entries key.
All language versions should be updated at the same time except if excluding the event from one language version is intentional.
An entry might look like this:
# This shows all available options
- name: "Event-Title"
content: '<strong>HTML-content</strong>'
start:
day: "09" # Always two digits
month: "03" # Always two digits
year: "2020"
end: # OPTIONAL
day: "13" # Always two digits
month: "03" # Always two digits
year: "2020"
time: "10:30-11:30" # OPTIONAL / any string, displayed next to a clock iconFooter content is defined within _data/XX/footer.yml
- name: "Multi-Day-Conference"
content: 'Do not miss <span style="color:red;">THIS</span>!'
start:
day: "22"
month: "09"
year: "2019"
end:
day: "23"
month: "09"
year: "2019"
- name: "Workshop in XY"
content: 'Lorem ipsum'
start:
day: "01"
month: "11"
year: "2019"
time: "15:00" # or "3 pm" or any other string
Front matter is a YAML-formatted block at the top of many jekyll-processed files to define variables for page generation.
| Name | Values | Description | Default | See also... |
|---|---|---|---|---|
| indexed | "true"/"false"/Nil | Page appears in global page search | Nil | - |
| background-position-y | Values | Allows to offset a feature image if the interesting part is not centered | "50%" | MDN |
| center-feature-img | "true"/"false"/Nil | The feature image is not cut but centered in a blurred bigger version of itself | Nil | - |
| alternatives | [Map: Language => Permalink] | Defines alternate versions for each language | Nil | Override Localization |
| Name | Values | Description | Default | See also... |
|---|---|---|---|---|
| title | [String] | Displayed in header and part of the title tag | Nil | - |
| subtitle | [String] | Displayed below title in header | Nil | - |
| gallery_path | [String] | Path to directory with image files | Nil | Galleries |
| author | [String] | Displayed in posts | Nil | - |
| feature-img | [String] | Path of the image that appears in the page header | Nil | - |
The directories pages and _posts are further divided into de and en language-specific paths:
.
├── pages
│ ├── de
│ └── en
└── _posts
├── de
└── en
If a file representing a post or page with the exact same filename exists in both language-specific directories, they are automatically linked and no further action must be taken.
Example: pages/de/about-us.md and pages/en/about-us.md represent the same page in different languages. Switching the language is automatically possible in the frontend.
Note: The permalink of such a post/page may not be altered through front matter except if you manually override default behavior.
By default the permalinks and locations of multi-language posts/pages are fixed. However, a post/page can be assigned any permalink and appear everywhere in the project where it is found by jekyll as long as the filepaths of all versions of the page/post and their language are manually defined.
Take the index.md at the root of this site for example. It is not in the pages/en directory, so this needs to be added to its front-matter:
lang: 'en' # If the value is 'en' this can be omitted site-wide since 'en' is the default value
alternatives: # A list of all the permalinks of other language versions of this page
de: /de
en: / # Note that the current page itself must also be listed!This must also be added to other versions of this page (e.g. pages/de/index.md):
lang: 'de' # If the value is 'de' this can be omitted in 'pages/de' since 'de' is the default value
alternatives: # A list of all the permalinks of other language versions of this page
de: /de
en: / # Note that the current page itself must also be listed!