-
Notifications
You must be signed in to change notification settings - Fork 8
English
This wiki describes how information in the FIPGuide can be adjusted and added. If you have any further questions, we are happy to help at [email protected].
This guide is aimed at users without prior experience using GitHub. If you already have experience, you can use your own development environment and jump directly to the Editing section to see which files you can adjust.
If you want to contribute information without editing it yourself, feel free to send it to us at [email protected] or use our contact form.
You can see the current information status for operators here: Content Status
This GitHub page of the project and its content will be referred to as the repository.
- To edit information, you must be logged in with your GitHub account. If you don't have a free account yet, create one.
- For quality assurance, not everyone can edit information directly in this repository. Therefore, you need to create a fork before your first edit. To create a fork of the repository, open it first: https://github.com/fipguide/fipguide.github.io
- Create a fork with the Fork button:
- If you have already created a fork of the project in the past, no new fork is needed. However, please update your fork using the Sync Fork button:
- Create the fork in your personal user area as the owner. The other fields are optional and can keep the default values. The fork can now be created with Create Fork:
- You now have your personal copy of the FIPGuide. To edit files, press the "." key on your keyboard while you have your fork open or change the ".com" in the URL to ".dev" (https://github.com/YOURNAME/fipguide.github.io becomes https://github.dev/YOURNAME/fipguide.github.io). Here you can edit files. More on this under Editing Information. You can also use the preview function to see a preview of your changes.
- After editing the files, you can open the source control menu on the left side. Here you will find an overview of all your changes. Please ensure that only intended changes are visible in this overview. Then you can enter a message. This serves as a brief description of your changes for later identification. To save the adjustment, press the Commit and Push button to save the changes in your fork:
- Now switch back to your fork. To do this, press the menu on the left and select Go to Repository:
- You can make further edits at a later time. If the changes are to be displayed on the FIPGuide website, the changes from the fork must be transferred to the main repository/project of the website. Use the Contribute -> Open Pull Request function for this:
- Here you can now request the transfer of the changes (Pull Request). We review all incoming changes for technical and factual accuracy. Ideally, you give us a suitable title and, if necessary, details about the changes in the description field. Then you can submit your changes to us:
- As long as your changes have not yet been accepted, you can make further changes at any time, which will become part of your pull request. We review your changes and then incorporate them into the main website. Thank you for your support. π
The files are organized according to the following folder structure:
FIPGuide
βββ ... (not relevant for content)
βββ content
β βββ country #1
β β βββ <country X> #2
β β βββ images #3
β β β βββ <image X>.webp #4
β β βββ index.de.md #5
β β βββ index.en.md #6
β βββ news #7
β β βββ <news X> #8
β β βββ images #9
β β β βββ <image X>.webp #10
β β βββ image.webp #11
β β βββ index.de.md #12
β β βββ index.en.md #13
β βββ operator #14
β β βββ <operator X> #15
β β βββ images #16
β β β βββ <image X>.webp #17
β β βββ index.de.md #18
β β βββ index.en.md #29
β βββ ... (other files for privacy policy, imprint, contact, homepage, ...)
βββ ... (not relevant for content)
#1: Parent folder for countries.
#2: One folder per country for information about it. Name: English name of the country
#3: Image folder of the country. Name: images
#4: All images of a country, preferably in .webp format.
#5: Article with country information in German. Name: index.de.md
#6: Article with country information in English. Name: index.en.md
#7: Parent folder for news articles.
#8: One folder per news article. Name: ascending number
#9: Additional image folder of the news article. Optional if needed. Name: images
#10: Additional images of a news article, preferably in .webp format.
#11: Preview image of a news article displayed on the article page and in the preview on the homepage in .webp format.
#12: News article in German. Name: index.de.md
#13: News article in English. Name: index.en.md
#14: Parent folder for railway operators.
#15: One folder per railway operator for information about it. Name: abbreviation of the railway operator
#16: Image folder of the railway operator. Name: images
#17: All images of a railway operator, preferably in .webp format.
#18: Article with information about the railway operator in German. Name: index.de.md
#19: Article with information about the railway operator in English. Name: index.en.md
Markdown format is used for writing text content. Markdown is a simple markup language that allows you to write text in an easily readable and editable format. Numerous guides for formatting with Markdown can be found on the internet, e.g., the GitHub Markdown Guide.
Content in different languages is coded by using language abbreviations in the filenames. For example, a German version of a file is suffixed with .de.md
and an English version with .en.md
. These suffixes are automatically recognized, and the content is displayed according to the website's language settings.
Only royalty-free images that are released for non-commercial use may be used. Ideally, these images should not require attribution. If attribution is necessary, the creator's name must be indicated in the text next to the image.
Existing information in Markdown format can be easily adjusted. If possible, information should always be adjusted in both German and English.
The existing templates and structures can be used as a guide, but deviations from the standard are possible in appropriate situations. However, an attempt should be made to maintain a consistent overall appearance for easier orientation.
A text page always begins with a section of at least the following metadata:
---
draft: <Publication status true/false>
title: "<Country name or abbreviation of the railway company in the language of the page>"
description: "<Short description of the content for preview/search engines/links>"
---
As far as possible, information should be supported with a source:
This information should be supported. [^1]
... At the end of the page...
[^1]: [My source website](https://www.bahn.de)
When editing a railway company, the following additional metadata should be noted:
country:
- "<Name of the country where the operator runs in English 1>"
- "<Name of the country where the operator runs in English 2>"
The additional metadata is important for the association between operator <-> country and for automatic menu generation.
When editing a country, the following additional metadata should be noted as a counterpart to the railway company:
country: "<Name of the country in English>"
The additional metadata is important for the association between operator <-> country and for automatic menu generation.
Certain formatting cannot be achieved natively with Markdown and requires custom HTML formatting. Some use cases are already defined as their own FIP templates:
To display information in a collapsible manner, the expander
shortcode can be used.
{{% expander "<Heading>" <expander-group> %}}
<Expanded text>
{{% /expander %}}
The expander-group is used to group multiple expanders. Only one expander per group can be open at a time. If multiple expanders are present in a group, the last opened expander will close when a new expander is opened.
Example:
To highlight or mark certain information, the highlight
shortcode can be used. The highlighting options tip
, inofficial
, and important
are available:
{{% highlight "<Highlight option>"%}}
<Highlighted text>
{{% /highlight %}}
Example:
Additionally, other predefined shortcodes are available. Further custom formatting can be created using HUGO shortcodes.
When adding new content, a new folder for the country or railway company must first be created (See Folder Structure). Then, the templates from the /archetypes/
folder can be used to create the information. The required metadata should also be filled out. For news articles, the appropriate preview image should also be added as a .webp
file.
The folder structure and a look at existing countries and railway companies can serve as a guide.
The FIPGuide uses HUGO as a website generator. For more in-depth adjustments and formatting, we recommend the official documentation or one of the many other guides available online.
Answer
A line break is created by ending the line with \
. Please do not use double white spaces. This is valid markdown, but makes the text less readable in the editor.
Need help? For questions and issues, we're happy to assist: https://fipguide.org/en/contact
Du brauchst Hilfe? Bei Fragen und Problemen helfen wir gerne: https://fipguide.org/de/contact