GithubHelp home page GithubHelp logo

somethingtodo123 / blockstack.org Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stacks-archive/blockstack.org

0.0 1.0 0.0 143.5 MB

The Blockstack website

Home Page: http://blockstack.org

JavaScript 93.09% CSS 6.85% Dockerfile 0.06%

blockstack.org's Introduction

Blockstack.org

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

Contribute · Explore


Blockstack.org

Discord 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

blockstack.org's People

Contributors

arisgk avatar aulneau avatar brettdewoody avatar cwackerfuss avatar dependabot[bot] avatar dionyziz avatar elimisteve avatar estermer avatar guylepage3 avatar hstove avatar hunterlester avatar jackzampolin avatar jcnelson avatar john-light avatar kantai avatar kyranjamie avatar larrysalibra avatar mattgordils avatar muneeb-ali avatar prateeksachan avatar robincwillis avatar sgairo avatar shea256 avatar stemby avatar thibauld avatar tthsn avatar vsund avatar wbobeirne avatar whoabuddy avatar yknl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.