The OpenJ9 website is built with Gatsby.js. See the Gatsby quick start guide for the basics.
-
Node 10+ Download Node.js from https://nodejs.org/en/
-
Gatsby.js When Node is installed, run the following command to install Gatsby.js:
npm install -g gatsby-cli
-
Install Node dependencies Clone the website Git repo and install the dependencies with the following commands:
git clone https://github.com/eclipse-openj9/openj9-website.git cd website npm install
- Run the development server:
gatsby develop
This command compiles your changes as you develop and hosts the website at http://localhost:8000. To explore GraphQL queries that Gatsby exposes, use http://localhost:8000/__graphql.
📝 Note about clearing your Cache: Sometimes when developing locally, the website shows cached content from previous versions of the website. To clear the cache before developing, run the following command:
gatsby clean
Open news-page-content/latestRelease.md
and edit it as required and this will automatically be converted to HTML during the build.
If you change the page URL, you must add a redirect to prevent broken links, especially from external sources.
- Open the
gatsby-node.js
file found at the root of the project - In the redirects section, add the following code snippet:
createRedirect({
fromPath: `/old/path`,
toPath: `/new/path`,
isPermanent: true
});
Note, you need to provide only the path.