premake/website
Samuel Surtees 2a3f3b75ec
Merge pull request #2006 from Jarod42/externalwarnings_vs2019
`externalwarnings`, `externalanglebrackets`, `externalincludedirs` was already available in vs2019
2022-12-11 17:12:08 +10:00
..
blog Add Community Update #10 2021-11-19 16:15:28 -05:00
community Doc edit. Add Matt's ECC in "Tool modules" (#1811) 2022-02-21 01:51:45 +01:00
docs Merge pull request #2006 from Jarod42/externalwarnings_vs2019 2022-12-11 17:12:08 +10:00
src Preparation for 5.0.0-beta2 2022-09-03 15:55:41 -04:00
static Add a workroud for localized dates on the website (#1770) 2021-12-09 19:01:42 +01:00
.gitignore Introduce new website with docs with docusaurus 2021-02-15 21:19:29 +01:00
babel.config.js Introduce new website with docs with docusaurus 2021-02-15 21:19:29 +01:00
docusaurus.config.js Update website/docusaurus.config.js 2022-02-28 20:12:09 +01:00
package.json Add a workroud for localized dates on the website (#1770) 2021-12-09 19:01:42 +01:00
README.md Fix broken links in docs 2021-06-01 23:24:42 +02:00
sidebars-community.js Break out community section on website 2021-03-29 16:18:54 -04:00
sidebars.js vstudio: add usestandardpreprocessor option 2022-09-20 17:21:19 -07:00

Premake Website

Premake website is built using Docusaurus 2, a modern static website generator. Search functionality is provided for free by Algolia DocSearch.

All docs pages can be found in the docs/ folder.

Adding a new entry to the docs

Editing our documentation website is very simple. You don't have to build a whole website for this. All pages are stored in Markdown files, so in order to add a new entry:

  1. Add a new Markdown file into the docs/ folder. Follow naming conventions there.
  2. Add your Markdown file's name into the sidebars.js. Make sure you've kept alphabetical order among category items.

Adding a reference to another documentation page

Always reference another documentation page like this:

[some text](Case-Sensitive-Filename.md)

and never like this:

[some text](some-markdown-file)
[some text](/docs/some-markdown-file)
[some text](https://premake.github.io/docs/some-markdown-file)

Use existing files in documentation as examples.

Installation

npm install

Local Development

npm start

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

To see a list of broken links (mistakes happen!), be sure to run npm run build before submitting updates. Your changes will be rejected if they contain broken links.

Build

npm run-script build

This command generates static content into the build directory and can be served using any static contents hosting service.

GitHub Actions

  • Every push and pull request that affects anything in website/** will trigger website build (to make sure that no errors like broken links were introduced)
  • Every push to the master branch in this repo that affects anything in website/** will trigger website deployment. It means that the website will be built and pushed to the master branch of premake.github.io.

Deployment

Target repo for deployment is specified in docusaurus.config.js.

  • organizationName is a GitHub account name: github.com/premake/premake.github.io
  • projectName is a target repository: github.com/premake/premake.github.io

docusaurus deploy command is used to automatically build and push static files into premake.github.io repo.

Deployments are authenticated by a key pair. The private key is hosted in premake-core in Settings > Secrets. The public key is host in premake.github.io in Settings > Deploy Keys.