The Blockstack website
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
bundles
common Post deployment updates + roadmap updates (#665) Sep 19, 2018
components
config
pages Post deployment updates + roadmap updates (#665) Sep 19, 2018
scss Switch to the temporary 'half-way' branding. Jul 26, 2018
.babelrc Post deployment updates + roadmap updates (#665) Sep 19, 2018
.dockerignore use self-signed cert in default nginx Jul 25, 2018
.eslintrc
.gitignore Post deployment updates + roadmap updates (#665) Sep 19, 2018
.nvmrc Post deployment updates + roadmap updates (#665) Sep 19, 2018
.prettierignore Build changes for new site (#566) Jul 9, 2018
.prettierrc
Dockerfile no more automatic ssl snake-oil shenanigans. deployments should mount… Jul 25, 2018
ISSUE_TEMPLATE.md
README.md
build-sitemap.js Post deployment updates + roadmap updates (#665) Sep 19, 2018
next.config.js
nginx-default.conf add legal + signup Jul 25, 2018
package.json Post deployment updates + roadmap updates (#665) Sep 19, 2018
routes.js
server.js
webpack.config.js state management, markdown for blog previews, styled-components for t… Jul 14, 2018

README.md


Blockstack.org

The official website for the latest information on Blockstack
blockstack.org

Contribute · Explore


Blockstack.org

Slack PRs Welcome

A live version of this site can be found online at https://blockstack.org.

Technology

This is a react application built using next.js. It is statically exported to markup + javascript. It is using redux-bundler (an abstraction on top of redux + reselect) for state management. Most of the content is written in Markdown, parsed using MDX.

Contributing

Be sure to have node + npm/yarn installed before getting started.

Fork the repo and pull it down to your machine, and then in the directory run:

npm install
npm run dev

OR

yarn install
yarn dev

Running the dev task will launch a local instance of the site with all the modern advantages of front end work (hot module reloading, etc).

Adding pages / routes

Next.js is first and foremost a directory/file based framework. If you look in the pages directory, you should get a pretty good idea of the routes contained within this project. To add a new route, simply create a file or folder with the route you want to add, and start coding! Files can be *.js or *.mdx

The blog gets its data from an external source (Ghost) and is parsed via /blog and /blog/single. Even though the data is external, you can still get some insight into how the routes work via the directory structure.

Exporting new pages

Because we are exporting the react application to run in places only static sites can, we have to pass our routes to the next.config.js file. We have a routes.js file that contains our static and dynamic routes. When adding a new page, make sure to add the path to this file.

Next.js has a function called exportPathMap in the next.config.js which allows the export to know what to export! You can also fetch data at this point to generate dynamic pages. Take a look at next.config.js to see an example.

Sitemap