Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Contribute pages #190

Merged
merged 6 commits into from
Aug 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,28 @@ meta:
slug: 'following-up'
- title: 'Appendices'
slug: 'appendices'
contribute:
label: contribute
output: true
title: Contribute
has_translation: false
toc:
chapters:
- title: 'Contributing To The Handbook'
- title: 'Adding A Page'
slug: 'adding'
- title: 'Editing A Page'
slug: 'editing'
- title: 'Adding A Term To The Glossary'
slug: 'add-term'
- title: 'Adding A Resource To The Library'
slug: 'add-resource'
- title: 'Translating The Guide'
slug: 'translate-guide'
- title: 'Translating The Glossary'
slug: 'translate-glossary'
- title: 'Markdown Examples'
slug: 'markdown-examples'

defaults:
-
Expand Down
13 changes: 8 additions & 5 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{% assign glossary = site.meta.glossary %}
{% assign value-stories = site.meta.value-stories %}
{% assign resources = site.meta.resources %}
{% assign contribute = site.meta.contribute %}
{% assign guide_entry_point = site.baseurl | append: '/' | append: guide.label | append: '/' | append: page.lang | append: '/' | append: guide.toc.entry_point | append: '/' %}
{% assign glossary_entry_point = site.baseurl | append: '/' | append: glossary.label | append: '/' | append: page.lang | append: '/' %}
{% assign value-stories_entry_point = site.baseurl | append: '/' | append: value-stories.label | append: '/' | append: page.lang | append: '/' %}
Expand Down Expand Up @@ -181,12 +182,14 @@
<li class="{% if page.url contains 'contribute' %}Selected{% endif %}">
<a href="{{ "/contribute/" | prepend: site.baseurl }}">Contribute</a>
<ul>
{% for contribute_page in site.pages %}
{% if contribute_page.section == 'contribute' %}
<li {% if contribute_page.url == page.url %} class="Selected"{% endif %}>
<a href="{{ contribute_page.url }}">{{ contribute_page.title }}</a>
</li>
{% for chapter in contribute.toc.chapters %}
{% assign chapter_url = site.baseurl | append: '/' | append: contribute.label | append: '/' %}
{% if chapter.slug %}
{% assign chapter_url = chapter_url | append: chapter.slug | append: '/' %}
{% endif %}
<li {% if chapter_url == page.url %} class="Selected"{% endif %}>
<a href="{{ chapter_url }}">{{ chapter.title }}</a>
</li>
{% endfor %}
</ul>
</li>
Expand Down
51 changes: 0 additions & 51 deletions contribute/add-resource.html

This file was deleted.

48 changes: 48 additions & 0 deletions contribute/add-resource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
section: contribute
title: Adding a resource to the library
authors:
- Mor Rubinstein
lang: en
---

<p class="lead">Our resource library is a curated collection of open data reosurces across the community. Everyone can add a resource to the library. This is how to do so.</p>

## 1. Add a folder

Log in to GitHub and head to this [link](https://github.com/{{ site.github_username }}/{{ site.github_repo }}/tree/gh-pages/resources).

Every resource has a slug number. To add your resource, you need to give it a number. Look at the list and give your resource the number that follows the current last number in the list (e.g. if the number is 056, your resource should be named 057).

Click on the plus symbol <code class="icon-plus"><span>[plus icon]</span></code> in the directory line and add the number and a slash ('/'). For example: `060/`.

## 2. Add an index file

Click on the plus symbol <code class="icon-plus"><span>[plus icon]</span></code> again. Add a file named 'index.md' to your new folder.

## 3. Add the resource

In the text editor, add the front matter fields in this pattern:

---
section: resources
lang: Two first letters of the language, according to language code in this table
Author: The name(s) of the person(s) who wrote the text
Country: One or more countries by full name, separated with a comma: ",". If there is no specific country, write 'global'
Description: 1-5 lines that summarizes the text
Keywords: Important descriptors of the text, separated with a comma, ","
Link: The link to the resource online
MediaType: List one out of these four types: Presentation, Article, Publication, Video
Notes: Any notes or comments
Publishing_date: The year the resource was published, e.g. 2015
Publishing_entity: The organisation(s) which publish the resource
Region: North America, Latin America, Asia, Europe, Africa, Mena, Global
Title: The name of the resource
Topic: Choose one out of these nine: The Basics, Advocacy, Privacy, Civic Engagement, Right for Information, Data Training, Policy Standards
---

## 4. Make a pull request

Click on “Create a new branch for this commit and start a pull request.” This will allow us to review your changes.

Thank you! All done!
47 changes: 47 additions & 0 deletions contribute/add-term.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
section: contribute
lang: en
title: Adding a term to the glossary
authors:
- Mor Rubinstein
---

<p class="lead">Each glossary (meaning, each translated instance of the glossary), has three components:</p>

* A layout template for the glossary homepage: 'glossary.html'
* A layout template for the glossary in each language: 'glossary/{lang}/index.md'
* A directory of the glossary terms. Each term in the directory is listed as the url slug (In English, all lower case letters, and hyphens instead of white spaces).

Currently, the English glossary has been updated and organized. Other languages please follow these [instructions](http://opendatahandbook.org/contribute/translate-glossary/).

To add a new term, all you need is to have a GitHub account.

## 1. Create a folder for the term

Log in to GitHub and go to this [link](https://github.com/{{ site.github_username }}/{{ site.github_repo }}/tree/gh-pages/glossary/en/terms)

You will see the branch name ('gh-pages') and a directory. You will also see the breadcrumb `{{ site.github_repo }} / glossary / en / terms / +`. Click on the plus symbol <code class="icon-plus"><span>[plus icon]</span></code> to create a new folder.

Write the name of the term that you want to add in a new slug (In English, all lower case letters, and hyphens instead of white spaces) and add a slash ('/') at the end of the terms name. This will create a new folder name.

## 2. Create a file for your term

Now you will see the breadcrumb - `{{ site.github_repo }} / glossary / en / terms / your-new-term / + ` Click on the plus symbol <code class="icon-plus"><span>[plus icon]</span></code> again. Now write in the path 'index.md'. This will save the whole file as a markdown file.

## 3. Write the term definition

In the text editor below, add the front matter (Jekyll way to mark the page):

---
section: terms
lang: en
title: The term name
---

Write the term definition after the front matter as usual.

## 4. Make a pull request

Click on “Create a new branch for this commit and start a pull request.” This will allow us to review your changes.

Thank you! All done! If the handbook editors are happy with your term, it will be added to the glossary.
47 changes: 0 additions & 47 deletions contribute/adding-terms.html

This file was deleted.

126 changes: 0 additions & 126 deletions contribute/adding.html

This file was deleted.

Loading