Giter Club home page Giter Club logo

Contribution Guide

This website is built with Docusaurus! 🦕

This means that unless you want to change the architecture of the site (adding/removing sections, reorganizing, etc) you should be able to just create and edit Markdown docs.


Examples 👀

If you want an example of what Docusaurus can do, look no further than the official Docusaurus website. Another great example is hack.aragon.org. Since Docusaurus is based on React, you can extend and customize it as little or as much as you'd like.


Docusaurus Docs 📚

Docusaurus has great docs. Rather than recreating them, I'll just link to the most useful ones for editing this site.


Hacking On Docusaurus 💻


TL;DR: to hack

Pull the repo to your local machine. Go into the website directory

  • yarn (to init stuff)
  • yarn start (to build and serve locally)

~ Everything that is a String can be edited via Markdown. The hot-reload server will show these changes if you refresh the local build in the browser.

If you change anything using Javascript, you're probably going to need to disengage yarn then run yarn start again to see changes

Good luck! 🍀


TL;DR: to publish

(assuming you have push access to the website repo, otherwise keep the local configuration in siteConfig.js and just submit a PR)

Uncomment stuff in siteConfig.js to configure for publishing to website (not gh-pages)

Then navigate to the website directory

Then run the script below

GIT_USER=your-username CURRENT_BRANCH=master yarn run publish-gh-pages

When you're done publishing, go to the github repo (https://github.com/1Hive/website/), click on settings, and make sure that under GitHub Pages 1hive.org is set as the custom domain and it says: "Your site is published at https://1hive.org/"


Here's the long form of what that all looks like...


Prerequisites

Developing the website locally requires a few things:

  • Git (sudo apt-get install git on linux)
  • Node
  • Yarn

If these are not enough, you can check out my Linux Dev Env quickstart guide to see what I'm running locally. If you discover a required dependency that is not in the list above, please open an issue to let me know! :)

Pulling the master branch

You'll then go to whatever directory you want to work on the project in and run

  • git clone https://github.com/1Hive/mvp.git

This will pull all the data to your local environment.

Configuring siteConfig.js

Run cd mvp/website/ to go to the directory that serves the Docusaurus website

Open siteConfig.js and check that the correct stuff is commented/uncommented for local development vs publishing

Building Locally

Make sure that you're still in the website directory (~/mvp/website/)

  • yarn (to init stuff)
  • yarn start (to serve stuff locally)

If yarn start is successful you will see the following output

LiveReload server started on port 35729
Docusaurus server started on port 3000

To see the website open localhost:3000 in your browser.

If you do not see the site, please go back to the beginning of this doc and try again following all the steps. If that still does not work please open an issue or comment and I'll help however I can.

  • note: I work on a remote VM that I ssh into so I won't know much about developing this on a laptop like Macbook.
  • another note: I don't like npm because it's slow and lame, so I'm using Yarn. Happy to help troubleshoot Yarn, but not npm

If everything is working, you can expect changes to the UI or Markdown to hot reload with a refresh of the page. Changes to Javascript related things will require you to disengage yarn start using ctrl C, then re-engage by running yarn start again. This causes Yarn to reload the whole thing ensuring that your JS changes show up.

Publishing

To publish you'll need to navigate to the website directory (~mvp/website/) and change the parameters in siteConfig.js to comment out local development and enable publishing.

  • https://github.com/1Hive/website/blob/master/website/siteConfig.js#L13

  • note: if you have 2FA enabled on your GitHub profile (and you would be wise to do so), you'll need to provide your GitHub API access token rather than your account password. You can learn about how to do that here

  • test that it's working by creating a small change to the README.md, going to the root directory of the project (~/mvp/) and pushing it to the repo

    git add . git commit -m "testing git login" git push

Once you've got that figured out... navigate to the website directory (~/mvp/website/) and run the following command to publish:

GIT_USER=your-username CURRENT_BRANCH=master yarn run publish-gh-pages

After about a minute (sometimes 5min) it should populate to the actual website URL: 1hive.org

❗ You're not done!

Once you've published, go to the github repo (https://github.com/1Hive/website/), click on settings, and make sure that under GitHub Pages 1hive.org is set as the custom domain and it says: "Your site is published at https://1hive.org/"

Also, before submitting any more PRs or pushes make sure that siteConfig.js is configured for local development so that it's ready for anyone to pulls the repo and work on it locally :)

Hope that helps! :)


Notes 📝

If you want the fun minimap to show up on the left side of the screen you need to use ## before each title.

Remember, that for the website to actually display stuff in docs or blog, you need to link them


1Hive's Projects

1hive-dao icon 1hive-dao

Contains deployment and other issues related to our Aragon DAO

1hive-ui icon 1hive-ui

Aragon-native toolkit of React UI components for decentralized apps, based on the Aragon Design System.

agps icon agps

Aragon Goverance Proposals repository

agreement-app icon agreement-app

Fork of Aragon Agreement app. Allow organization actions to be governed by a subjective set of rules, that cannot be encoded into smart contracts 📜

airdrop-app icon airdrop-app

An Aragon app for distributing tokens or reputation using a merkle airdrop.

apiary-paper icon apiary-paper

Apiary is mechanism for accountable crowdfunding using bonding curves and a continuous tap.

aragon icon aragon

Aragon client to create and manage decentralized organizations on Ethereum.

aragon-apps icon aragon-apps

(Aragon 1) Aragon apps developed by Aragon Core Devs (smart contracts + webapps)

aragon.js icon aragon.js

(Aragon 1) A monorepo of JavaScript libraries for interacting with Aragon

aragonos icon aragonos

Reference implementation for aragonOS: a Solidity framework for building complex dApps and protocols

celeste-helpers icon celeste-helpers

Package to help easily develop smart contracts integrating with 1Hive's Celeste

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.