These files contain a Jekyll set-up for a the new MegaMek website hosted at GitHub pages. Github pages supports Jekyll set ups and the site will automatically re-build any time a new commit is pushed to this repository.
The other reasons for using Jekyll is that we can separate frequently updated content from the HTML formatting and design, without having to rely on a database system. This repository is designed so that all content information is pulled from simple Markdown and YAML files that can be easily edited without fiddling around with a bunch of HTML code.
The latest program version information is kept in YAML file
current_releases.yml in the _data folder. The version information and
download links that show on the website depend on this file. For the download
links to work properly, each release should just include the number of the
release without a "v."
The public pages are /launcher-privacy.html, /code-signing.html, and
/credits.html. The privacy contact uses the existing email in _config.yml.
The signing policy is launcher-scoped and currently uses pre-approval wording;
it does not claim that signing is active or that other programs are signed.
The shared footer links to all three pages. Launcher promotion, installation
guides, and release-channel download changes are not part of this addition.
Keep the artists' credits and any applicable notices in credits.md up to date
when artwork is added or changed.
Before activating signing, confirm the named roles and implement these
operational requirements:
- Team members must use multi-factor authentication for GitHub and SignPath.
- Changes from contributors who are not trusted committers require review.
- Each signing request requires manual approval by a listed signing approver.
- Signed artifacts must be built from the official source repository in a verifiable way.
After the first signed Windows MSI is verified and published, update the signing
status and service attribution in code_signing.md and any launcher download
notices added later; do not imply older installers,
game archives, or Linux/macOS packages were signed by that Windows integration.
Page content is stored in markdown files in the wiki directory, and in the
root directory. Here is a list of the files that currently exist and what
content they change:
- In root directory:
launcher_privacy.md: Launcher-specific privacy policy.code_signing.md: Launcher signing status, responsible maintainers, and policy.credits.md: Artwork, project contributors, and dependency notices.community.md: Information about the MegaMek community. Shows on its own page.play.md: Information about how to play MegaMek and MekHQ. Shows on its own page.downloads.html: Download informationfaq.html: FAQ Informationinstallation.html: How to install and update informationservers.md: Current games that are being announced for anyone to join.
- The
wikidirectory contains additional markdown files for supplementary content that is not directly used in the main navbar but that can be linked to and is available atwiki/name_of_file.htmlwhen the site is compiled.
More information about using markdown to write pages can be found here. Its super easy.
New posts can be created as Markdown files in the _posts directory. File names
should always start with "YEAR_MONTH_DAY" to ensure that they are properly sorted.
Follow the layout of existing posts for the header information. The most recent
six posts will show on the front page and the rest will be available in an archive.
FAQ information is kept in YAML files in the _data/faq directory. Each file
includes question and answer fields for each item. Currently there are three different
categories of technical, unit, and miscellaneous. If these categories are changed/expanded,
the faq.html file will require editing to accommodate the new categories.
To create new pages, add a markdown file to the root or wiki directory with the same front
matter that is currently in the play.md file. Layout should remain "info_page" and the
title should be unique. A splash image from the assets/images directory is optional.
To add this page to the top navbar, you need to edit the menu-pages.csv file in the _data
directory. The name provided must match the title given in the front matter and the address
should point to a file of the same name but with an html rather than md suffix.
Before addition, screenshots should be cropped to have an aspect ratio of 2:1 (width to height). this can be done easily with pixlr, GIMP, or PhotoShop by maintaining an aspect ratio of 1200 x 600 when cropping.
New screenshots should be added directly to assets/images/screenshots. To get them to show up
in the carousel, you will have to add a line to _data/screenshots.csv indicating the full file
name, the program being displayed (i.e. MegaMek, MekHQ, or MegaMekLab), and a caption.
To use images in a post or page, first add the image to the assets/images directory. Then you can
reference the image in your markdown document with:
{:class="img-fluid"}The class call ensures that the image will resize by device. This will scale images the full width
of the container if they are too large. To get a smaller width use {:class="img-fluid w-75"} or
{:class="img-fluid w-50"} to shrink the image to 75% or 50% of the full width, respectively.
You can also put other documents into the assets directory and reference them in a similar way. For example, for a PDF:
[get the PDF](/assets/mydoc.pdf)To test out changes to a local repository, you need to install Docker. Then from the command line within the repository run:
docker build -t jekyll .to build a local Docker image containing all the tools needed to compile and host the site. Once the image is built, just use:
docker run -it --rm -v ${PWD}:${PWD} -w ${PWD} -p "4000:4000" jekyllto start the local site host.
The website should then be viewable at localhost:4000.
For minor spelling/grammatical corrections or basic updates to content (e.g. updating links), devs with access may push directly to the main branch. For substantial content revisions, new content, or website design changes, a pull request should be made and approved by another dev.