WAI/Website/Repository Types

From W3C Wiki
< WAI‎ | Website

Moved and edited to here: https://wai-website-theme.netlify.com/technical/files/

Common Structure

All repositories have a common base structure with the following files and folders. Only the bold files are expected to be edited by editors. Files marked with a (T) are for technical support only

  • (T) Gemfile – A list of ruby gems that are required for the website to work.
  • (T) Gemfile.lock – Locks the exact versions of above gems.
  • README.md – Readme of the repository. Is never rendered as an HTML file and should contain information about the repository: What is it about, where can I find background information. Often includes the link to the repository preview.
  • (T) _config.yml – Configures the Jekyll installation, usually not touched after the initial setup.
  • (T) _data – Data files that are used by the theme to render the navigations, links to techniques and WCAG and as data for the language selector/translations. (Unfortunately, there is currently no way to bundle those files with the theme.)
    • (T) lang.json – The World’s Languages
    • navigation.yaml – The navigation. Add your page to the navigation to get left-side navigation and a breadcrumb.
    • (T) techniques.yml – WCAG Techniques data (not widely used)
    • (T) wcag.yml – WCAG data (not widely used)
  • content-images – Every repository has a content-images directory that can hold assets in a sub-directory that has the name of the repository. This helps us to keep the assets of different repositories separated.
    • <repo-name>
  • index.md – In most repositories content goes into the index.md file or…
  • other.md – … other Markdown files in the main directory.
  • (T) w3c.json – Data for the W3C API.

Database-Like and Collections of Pages Repository

For some resources, it is easier to use the Jekyll Collections feature. This is especially true for collections of data (like the Laws and Policies resource) or the wai-about-wai repository where only team works on a bunch of documents that belong losely together.

Those collections have a _<collection> directory (that needs to be unique across the W3C/WAI website). The pages inside such a collection can have different common templates and support previous/next navigation.