Skip to content

OpenTermsArchive/opentermsarchive.org

Repository files navigation

OpenTermsArchive.org

The website that presents Open Terms Archive to the general public.

Installation

Dependencies

This website is built using Hugo, a static website editor, and uses Node.js.

To build it, install Hugo (>= v0.114.0) and Node.js, and then:

git clone https://github.com/OpenTermsArchive/opentermsarchive.org
cd docs
npm install
hugo

Usage

Building the site

hugo

The website will be built in the public directory.

Serving the app locally

For development purposes:

npm run start:dev

Linting Markdown files

To lint the Markdown files use the following command:

npm run lint:markdown

To apply automatic corrections use the following command:

npm run lint:markdown -- --fix

Linting CSS files

To lint the CSS files use the following command:

npm run lint:css

To apply automatic corrections use the following command:

npm run lint:css -- --fix

Linting JavaScript files

To lint the JavaScript files use the following command:

npm run lint:js

To automatically fix, where possible, problems reported:

npm run lint:js -- --fix

Linting HTML files

To lint the HTML files use the following command:

npm run lint:html

To automatically fix, where possible, problems reported:

npm run lint:html -- --fix

Testing

Run the entire test set

npm run test

Check for broken links

npm run test:links

Check for HTML validation

npm run test:html

Note that because of CloudFlare protection, tests on external links are not run in CI so as not to block on 503 errors.

Check for end-to-end

npm run test:e2e

Deployment

The main branch is used on production and automatically deployed through GitHub pages. Refer to the configuration file .github/workflows/gh-pages.yml.

For each pull request, a preview is automatically deployed through Netlify and a comment on the GitHub pull request display the necessary information, such as the preview URL. The configuration can be found in netlify.toml file.

Contributing

See our contributing guide.

Contributors

Nicolas Dupont
Nicolas Dupont

💻 🚇
Matti Schneider
Matti Schneider

💻 📆
Clément Biron
Clément Biron

💻 🎨

License

The code for this software is distributed under the European Union Public Licence (EUPL) v1.2. Contact the author if you have any specific need or question regarding licensing.