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.
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.
- A Mac with Xcode 26 or later, which includes DocC.
There are no other dependencies: the pages are plain HTML, CSS and JavaScript.
Builds the documentation, adds the pages on top, and writes the result to _site/:
scripts/build-website.shThe 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 /ContainersServes _site/ locally:
python3 -m http.server --directory _siteThen open:
- http://localhost:8000/ for the landing page
- http://localhost:8000/release-notes/ for the release notes
- http://localhost:8000/documentation/containers/ for the documentation
Rebuild after each change, then refresh the browser.
| 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 Markdown file to
Containers.docc/, starting with a#title and a one-sentence summary. - List it under a heading in the Topics section of
Containers.docc/Containers.md, as- <doc:FileName>. - Build the website to check the article's links.
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.
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.
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.
Contributions to the website and the documentation are welcome. Read the Contributor's Guide before opening a pull request.
The website is licensed under the Apache License 2.0.
The Containers app has its own license, described in the Containers repo.