Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Containers Website

Website

Repo for the Containers website, served at try-containers.github.io.

The website has two parts, built into a single site:

  • Pages, hand-written in HTML and CSS: the landing page and the release notes, in site/.
  • Documentation, written as articles in a DocC catalog and rendered with Swift-DocC, in Containers.docc/. It documents the app, not its code.

Development

Releases

Releases of the website are triggered by commits to the main branch. The Website workflow builds the site, and deploys it to GitHub Pages. Pull requests build the site too, so a change that breaks the build fails before it's merged.

Requirements

  • A Mac with Xcode 26 or later, which includes DocC.

There are no other dependencies: the pages are plain HTML, CSS and JavaScript.

Build the website

Builds the documentation, adds the pages on top, and writes the result to _site/:

scripts/build-website.sh

The build treats DocC warnings as errors, so a broken link between articles, or a mistake in an article's markup, stops it.

To build the site as it's served from a subpath, pass the path:

scripts/build-website.sh /Containers

Preview the website

Serves _site/ locally:

python3 -m http.server --directory _site

Then open:

Rebuild after each change, then refresh the browser.

Repository layout

Path Contents
site/ The landing page, release notes, styles, scripts and icons. Copied over the documentation when the site is built.
Containers.docc/ The documentation articles, the root page that lists them, the DocC theme settings, and the documentation's footer.
scripts/build-website.sh The build, used both locally and by CI.
.github/workflows/website.yml Builds every pull request, and deploys main to GitHub Pages.

Add a documentation article

  1. Add a Markdown file to Containers.docc/, starting with a # title and a one-sentence summary.
  2. List it under a heading in the Topics section of Containers.docc/Containers.md, as - <doc:FileName>.
  3. Build the website to check the article's links.

Add a release

Copy a <section class="release"> block in site/release-notes/index.html, newest first. Keep its features in step with the What's New sheet, in Containers/Models/App/AppInfo.swift in the Containers repo.

In-app help

The Containers app shows the published documentation in its help window. Its web view adds ContainersHelp to the user agent, and when site/scripts/docs.js sees it, the documentation hides the website's footer and follows the app's appearance instead of the one saved on the website. Keep that check if you change the script, or the app's help window shows the website's footer.

Keep the footers in sync

The pages and the documentation share a footer, written twice: in site/index.html and site/release-notes/index.html, and in Containers.docc/footer.html for the documentation. A change to its links or copyright needs all three.

Contributing

Contributions to the website and the documentation are welcome. Read the Contributor's Guide before opening a pull request.

License

The website is licensed under the Apache License 2.0.

The Containers app has its own license, described in the Containers repo.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages