Skip to content

paritytech/substrate-website

Repository files navigation

Substrate Website

Netlify Status

Content contribution, PRs and merging flow

  • PR providing content (json, md...): open PR against main branch (production)
  • PR providing new features: open PR against main branch (PR builds in netlify staging env)
  • PR providing hotfixes open only against main (PR builds in netlify staging env)

Website Architecture (IA /developers)

image

Development

Install

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

Start development server

Navigate into your new site’s directory and use the following command to start the development server locally.

yarn develop

Setup, configuration & plugins

i18n (bypassed)

Docs:

Configuration

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.

Extract strings

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 (bypassed)

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.

local git-gateway backend

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.

Adding, updating and removing content from Ecosystem Projects

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.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published