Skip to content

Special pages

alessandro contini edited this page Oct 23, 2017 · 5 revisions

An homepage, about page and posts might not be enough to describe the complexity of bigger projects. For this reason special pages have been created where more detailed content can be shown and highlighted in various forms (see this website as an example: http://rampette.opencare.cc/)

These pages will live in a folder called /pages/ and will make use of the projectPage layout.

The frontmatter of these pages is more complex since they can handle different pieces of information at once. Let's take page1.md as an example

---
layout: projectPage
title: Page 1 EN
subtitle: "This is the subtitile in english for page 1"
shortTex: "This is the shortText in english for page 1"
buttons:
  - text: View on GitHub
    link: https://github.com/opencarecc/MicroWebsiteTemplate
release: Release 1.0 - 2017/08/01
features:
  - "Feature 1"
  - "Feature 2"
  - "Feature 3"
github_release_link: https://github.com/opencarecc/MicroWebsiteTemplate
gallery:
  - "../assets/img01.jpg"
  - "../assets/img02.jpg"
  - "../assets/img03.jpg"
newsCategory: category1
published: true
lang: en
ref: page1
permalink: page1/
---

More details about the frontmatter

Let's explode the frontmatter for further explanation of its components.

The following strings will determine the content of the highlighted section at the top of the page, in a similar fashion to the header in the homepage of the website

subtitle: "This is the subtitile in english for page 1"
shortTex: "This is the shortText in english for page 1"
buttons:
  - text: View on GitHub
    link: https://github.com/opencarecc/MicroWebsiteTemplate
  - text: Build your own
    link: https://github.com/opencarecc/MicroWebsiteTemplate/wiki

Special Page

The following strings will determine the pictures shown in the slider in the second section at the top of the page

gallery:
  - "../assets/img01.jpg"
  - "../assets/img02.jpg"
  - "../assets/img03.jpg"

Special page

The following strings will determine the content of the Release section

release: Release 1.0 - 2017/08/01
features:
  - "Feature 1"
  - "Feature 2"
  - "Feature 3"
github_release_link: https://github.com/opencarecc/MicroWebsiteTemplate

Special page

The following string will only show posts pertaining to a specific category in the lower section of the page

newsCategory: category1

Special Page

Last but not least, the following strings will take care of identifying the language of the page and link to translations

lang: en
ref: page1
permalink: page1/

Translation

The translated version of the page pagina1.md will live in /it/pages/ (where /it/ can be any other languages, as long as the folder really exists...) and will have the following frontmatter

---
layout: projectPage
title: Pagina 1 IT
subtitle: "Questo è il subtitle in italiano di pagina 1"
shortTex: "Questo è il shortTex in italiano di pagina 1"
buttons:
  - text: Vedi su GitHub
    link: https://github.com/opencarecc/MicroWebsiteTemplate
release: Release 1.0 - 2017/08/01
features:
  - "Feature 1"
  - "Feature 2"
  - "Feature 3"
github_release_link: https://github.com/opencarecc/MicroWebsiteTemplate
gallery:
  - ../../assets/flyer.jpg
newsCategory: categoria1
published: true
lang: it
ref: page1
permalink: it/pagina1/
---