Skip to content

thejsdevsite/jsdev

Repository files navigation

Gatsby

JS.dev

Build Status Contribute on Github Node Version 12.13.0

JS.dev is an open and transparent JavaScript development community. We welcome and publish contributions from members of the community, for a diverse range of topics covering development with JavaScript.

Our website is built with GatsbyJS and hosted on Github Pages. If you would like to request a feature, you can do so on our issues page, or submit through a pull request.

📝 Contributing

Our blog pages are a combination of markdown files and frontmatter formatting. To submit a new article, create a pull request on the content repository, and follow the guide in that project.

🚀 Building locally

This project makes use of git submodules:

This project makes use of the nvm version manager, with node version 12.13.0. To setup:

# Make sure the version of node exists first
nvm install 12.13.0

On Linux/OSX/WSL:

nvm use

On Windows (use Windows nvm):

# Windows terminal you have to use specific version
nvm use 12.13.0

Run npm install to download and install the project dependencies. The easiest way to get GatsbyJS up and running in your local environment is to download the GatsbyJS CLI tools:

npm i -g gatsby gatsby-cli

At this point, your content directory will be empty. Let's go ahead and set that up:

git submodule update --init --recursive

We can now use GatsbyJS CLI to start development in a local environment:

gatsby develop

Gives us two local URLs:

💫 Deploy

To build for production deployment, run the GatsbyJS serve command. Assets such as sitemap.xml, feed.rss and robots.txt will become available, while the GraphQL server will not be started.

npm run clean && npm run build && npm run serve

You can view the deployed site locally: