-
Notifications
You must be signed in to change notification settings - Fork 4
CNTR Monitor
URL | Build Status |
---|---|
monitor.cntrarmscontrol.org |
The Monitor subpage is hosted via Netlify directly and technically not part of the CNTR webpage. So access restrictions and other settings can be performed via the Netlify backend.
The site is made up for five separate content types (Issues, Posts, Terms, Authors, and Pages) and localised into two languages (English and German). All content is stored in the form of MDX files in the /content
directory, which is structured as follows:
├─ content
├─ assets
├─ [language]
├─ pages
├─ terms
├─ issues
├─ [year]
├─ posts
├─ authors
├─ index.mdx
Issues correspond to single editions of the CNTR Monitor, as they appear in print.
To set up a new issue, create a new folder inside the language directory (typically named after the issue number). Then, create two folders named posts
and authors
and a file called index.mdx
inside the new folder.
├─ [language]
├─ issues
+ ├─ 2025
+ ├─ authors
+ ├─ terms
+ ├─ posts
+ ├─ index.mdx
Use frontmatter in index.mdx
to set the new issue's title, year, cover image, and other meta information. The following frontmatter fields are supported:
-
order
: String (required). Used to determine where the issue appears in the archive. -
year
: Number (required). Publication year as a four-digit integer, used to determine the issue's URL. -
publication_date
(optional). Publication date in YYYY-MM-DD format. -
title
: String (required). -
intro
: String (optional) -
color
: String (optional). Set a featured colour for the issue. Light and dark shades will be generated automatically and used throughout the issue and post views. Supports all CSS colour formats. Hex values must be enclosed in double quotes. -
cover_image
: String (optional). Must reference an image file in theassets
folder. -
cover_alt
: String (optional). Short, visual description of thecover_image
. Required for accessibility. -
cover_caption
: String (optional) -
cover_credit
: String (optional) -
download_url
: String (optional). Direct download link to the issue's PDF version.
Here's an example of a well-formed index.mdx
file:
---
order: 1
title: "This is the issue title"
year: 2024
intro: "The introduction goes here"
color: "#b634ef"
cover_image: "assets/circuit.jpg"
cover_caption: "Hier steht die Bildunterschrift"
cover_credit: "Name Surname / NASA"
download_url: "https://www.hsfk.de/fileadmin/HSFK/hsfk_downloads/prif-jahresbericht_2022_download.pdf"
---
Posts are the individual articles inside each issue.
To add a new post, create a new file inside the issue's posts.
folder. It's a good idea to give your posts filenames starting with numbers so they appear in the right order in your code editor. Otherwise, the filename has no effect.
├─ [language]
├─ issues
├─ [year]/
├─ authors
├─ terms
├─ posts
+ ├─ 1-post-title.mdx
├─ index.mdx
Use frontmatter to set the post's title, introduction, and other meta data. The following frontmatter fields are supported:
-
order
: Number (required). Used to determine where the post appears in the posts list in the issue view. -
eyebrow
: String (optional) -
title
: String (required) -
intro
: String (optional). Appears in the post header in large type in the posts list in the issue view, unlessteaser
is set. -
teaser
: String (optional). Appears in the posts list in the issue view. If not set,intro
is used instead. -
category
: String (optional). Used to determine subdivisions in the post list in the issue view. -
tags
List of strings (optional): Used to surface post in search results -
authors
: List ofauthor_id
s (optional). References the post's authors so their names, bios, and other information can be displayed.
Use the body to add the post's content. In addition to standard markdown formatting, posts support MDX components for images, callouts, term definitions, and other rich content. See MDX Components for a list of available components.
Here's an example of a well-formed post file:
---
order: 3
title: "This is the post title"
intro: "The introduction goes here"
category: "Analysis"
tags:
- Tag A
- Tag B
authors:
- jane-doe
---
This is the post body. It supports standard markdown features like _emphasis_, [links](https://example.com) and footnotes [^1], as well as custom MDX components:
<Term t="my-term-id">This is an inline term definition</Term>
[^1]: This is the footnote content
Terms are abbreviations and technical terms that might benefit from explanation outside an individual post. They are global to the entire site: There is only set of terms data shared among all posts in a given language.
To add a new term, create a .mdx
inside the terms/
folder.
├─ [language]
├─ issues
├─ [year]/
├─ authors
├─ terms
+ ├─ my-term.mdx
├─ posts
├─ index.mdx
Use the frontmatter to set the term's meta data. The following frontmatter fields are supported:
-
title
: String (required) -
term_id
: String (required). Used to reference the term in the<Term/>
component. Must be unique.
The body of the file contains the term's definition. Standard markdown formatting is supported, MDX components are not. Here's an exmaple of a well-formed term file:
---
title: Teamarbeit
term_id: teamarbeit
---
Teamarbeit bedeutet, gemeinsam Aufgaben zu bewältigen, Probleme zu lösen oder Projekte erfolgreich abzuschließen.
Authors represent people displayed in post's bylines. To add a new author, create a .mdx
file in the authors/
folder inside a given issue:
├─ [language]
├─ issues
├─ [year]
├─ authors
+ ├─ my-author.mdx
├─ posts
├─ terms
The following frontmatter fields are supported:
-
name
: String (required) -
author_id
: String (required): Used to reference authors in posts frontmatter. Must be unique.
The body of the file contains the author's bio and related information. Standard markdown formatting is supported, MDX components are not. Here's an example of a well-formed author file:
---
name: Jane Doe
author_id: jane-doe
---
This is the author's bio, containing [links](https://www.example.com) and other formatting.
To add a new page, create a .mdx
inside the pages/
folder. Pages automatically appear in the footer menu.
├─ [language]
├─ pages
+ ├─ my-page.mdx
The following frontmatter fields are supported:
-
order
: Number (required). Used to Ddtermine where the page appears in menus. -
title
: String (required). Used to determine the page's URL. -
intro
: String (optional)
The body of the file contains the page content. Standard markdown formatting and MDX components are supported.
Displays an alphabetical list of all terms in the current language.
<TermsList/>
Displays a miniature version of the CNTR logo to mark the end of a post.
...Dann ist eine Trennung kaum möglich. Oder ist es „nur“ ein _alignment_ oder ein kurzfristiges, vielleicht militärisches Bündnis, das nicht lange Bestand haben wird? Dann können eine Unterstützung und Kooperation sinnvoll sein <Chevron/>