- PR providing content (
json
,md
...): open PR againstmain
branch (production) - PR providing new features: open PR against
main
branch (PR builds in netlify staging env) - PR providing
hotfixes
open only againstmain
(PR builds in netlify staging env)
Navigate into your cloned local repo directory and install all dependencies.
yarn
Configure environment variables
Copy example.env.development
and rename to .env.development
Config URL variables based on your preferable local setup. URL will be used for links generation between Substrate websites.
Default localhost port configuration:
GATSBY_WEBSITE_URL=http://localhost:8100
GATSBY_DOCS_URL=http://localhost:8200
GATSBY_MARKETPLACE_URL=http://localhost:8300
Start development server
Navigate into your new site’s directory and use the following command to start the development server locally.
yarn develop
Docs:
- https://github.com/microapps/gatsby-plugin-react-i18next#how-to-extract-translations-from-pages
- https://www.i18next.com
- https://react.i18next.com
You can find the config for i18n, using i18next with gatsby-plugin-react-i18next
.
- the markdown content is located in
./content/{language}/{content_type}/*
/ - the language strings are located in
./locales/{language}/{data_type}.json
The default language (and fallback language) is en
for english.
To extract the strings that needs to be translated, it is possible to run yarn extract-locales
, which will generate the /locales-tmp
folder.
netlify-cms-app
& gatsby-plugin-netlify-cms
are used to setup [netlify-cms](https://www.netlifycms.org)
for this project.
The gatsby gatsby-config pluggin, points to the file src/cms/index.js
, as entry file of the configuration.
To develop and use netlify-cms with the data available in the local repository folder:
In the file ./.env.development
set:
GATSBY_NETLIFY_CMS_GIT_LOCAL=true
Then in the project's root folder run:
npx netlify-cms-proxy-server
and in an other shell and the same folder, run the development server as usual.
Substrate projects can be added, updated, or removed by updating the markdown files located at content/en/projects
.
To add a new project please add a new markdown file in this folder that follows the naming convention already in place.
To remove a project please remove the appropriate markdown file in content/en/projects
.
The same editing is available for project types and project categories the markdown for these fields lives in content/en/project-types
and content/en/project-categories
respectively. Please use the current markdown structure as a template and guide.