This repository has been archived by the owner on Aug 17, 2020. It is now read-only.
forked from FirefoxUX/photon
-
Notifications
You must be signed in to change notification settings - Fork 4
How to contribute to the DevTools Design System Documentation
Blake Winton edited this page Sep 4, 2018
·
1 revision
The repository is at: devtools-html/photon
You can test locally with localhost
but if you’re adding just content then it should be fine
Pages make use of includes, links to content from other files (typically .md
markdown files)
- Edit the .md file in the Github editor, the page markdown files are located in
photon/jekyll
- When you’re happy with your changes fill out a Commit changes comment at the bottom
- Click the Create a new branch for this commit radio button so that your amends aren’t committed direct to master. Give your branch a name.
- Click the Propose file change button.
- Submitting the page takes you to the the Open a pull request page where you can ask for reviewers. You can ask Blake Winton, Victoria Wang or Matt Croud for a review.
- To end your submission click the Create the pull request button.
A notification will be sent to either Blake, Victoria or Matt. We will check the files changed and leave comments for feedback if necessary.
In general, Blake will carry out merges.
There are two methods for Creating a new page. You can simply use the Github UI or Checkout the Repository create the page locally.
- In the repository travel to the category you wish to add a new page to e.g.
photon/jekyll/_motion/
- Click the Create new file button at the top of the page.
- The first thing to do is to add a front matter snippet at the top of your page (example below). Front matter is metadata for Jekyll that makes your page function. With the front matter in place, change the title and order values as required.
Front matter template:
You should also add the optional
--- layout: page title: Duration and Easing order: 1 ---
draft : true
flag to highlight your page as a draft. - When you’re happy with your changes fill out a Commit changes comment at the bottom
- Click the Create a new branch for this commit radio button so that your amends aren’t committed direct to master. Give your branch a name.
- Click the Commit new file button.
- On the Open a pull request page (pictured below) provide a message and mention either @violasong @mcroud or @bwinton for review. [add image here]
- To end your submission click the Create Pull Request button.
As a rule of thumb, try to copy snippets and layout code from existing pages e.g. For a two column layout use the markdown from the existing principles page (jekyll/_includes/introduction/principles.md)
- Checkout the project on Github so you have a local copy and make a new branch.
git clone https://github.com/devtools-html/photon.git git checkout -b branch_name
- It is a good habit to run
git pull
to ensure your local copy is up to date. - Go into jekyll folder and add your new
.md
page under the appropriate category. - The first thing to do is to add a front matter snippet at the top of your page (example below). Front matter is meta data for Jekyll that makes your page function. With the front matter in place, change the title and order values as required.
Front matter template:
You can can also add the optional
--- layout: page title: Duration and Easing order: 1 ---
draft : true
flag to highlight your page as a draft. - Complete your document in markdown
You can use docker to run a local copy if you want to preview your work locally, Docker set up information is available in the
README.md
- Include other files using this syntax:
{% include introduction/example.md %}
to keep pages smaller more manageable. Include files are stored in the _includes folder.
Two common includes are:
{% include global/do.md %}
{% include global/dont.md %}
Which add DO and DONT headers to the page. - When your happy to submit your page; git add your file, ready for committing.
git add <filename>
- Git commit your changes
git commit -m "Commit message"
- Push the changes to origin specifying your new branch:
git push origin <branch-name>
- On the github repo page you should see the new branch notification message, click the Compare and pull request button, provide a message and mention either @violasong @mcroud or @bwinton for review. Click Create Pull Request.
- If there is feedback for your pull request you will be notified by comment. If there is no feedback your submission will be merged.
- Your branch will be deleted once it is merged so remember to create a new branch for future amends.