Code Monkey home page Code Monkey logo

opendatahandbook's Introduction

opendatahandbook-v2

Repository of http://opendatahandbook.org/

This is a Jekyll based site, with pages written in HTML and Markdown (specifically Kramdown), with Markdown being used where possible for ease of editing.

Editors

Please see the Contribute section of the site for further instructions.

Developers

Dependencies

Information architecture

There are four sections of content, implemented as simple Jekyll pages: guide, value-stories, glossary, and resources.

Some sections have translations. These are implemented by adjacent directories, where the name of the directory is the locale of the translation.

Guide

The narrative content of the Open Data Handbook.

Value Stories

A collection of stories demonstrating examples of open data wins.

Glossary

A glossary explaining terms used in the Open Data Handbook.

Resources

Additional resources for the Open Data Handbook.

Working with the glossary

Each glossary (meaning, each glossary translation), is made of three components:

  • A 'glossary.html' layout template
  • A 'glossary/{lang}/index.md' page, which uses the glossary layout to render a list of glossary terms in the correct language
  • A 'glossary/{lang}/terms/' directory, which contains an entry for each glossary term. Each entry is the slugified name of the English version of the term.

Currently, the English glossary has been organized. To expand this pattern to other languages:

  • Copy the English terms directory into your target language directory
  • If your current index.md has translated glossary terms, then add them to the appropriate page under 'terms', replacing the English text that was copied over from 'en'.
  • Then, replace your target language's index.md file with the 'en' one, changing the lang value to that of your target language.

Branches

  • gh-pages - pre-built live site
  • master - site in Jekyll form
  • dev - minimal content, to speed up building (for development)
  • theme - no site specific content, used to create new sites

opendatahandbook's People

Contributors

abonte avatar aivuk avatar dlac03 avatar ecedenyo avatar emmabeer avatar higa4 avatar higa4-grp avatar jgkim avatar joetsoi avatar katerogers avatar lipve avatar ljoelle avatar mariekeguy avatar masanobukojo avatar mih4ajlo avatar morchickit avatar napo avatar nikeshbalami avatar nyampire avatar patriceblain avatar pwalsh avatar rnanclares avatar rufuspollock avatar rustedfish avatar schlos avatar smth avatar tkaneda avatar tlacoyodefrijol avatar yoshikazukashiwazaki avatar ytk-mt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opendatahandbook's Issues

See what translations of the guide are available

This is theme related.

As a User I want to see I can read a section (e.g. guide) in my language

As a User I want to know which languages I can read the guide (or maybe whole) handbook in so that I can see if my language is supported (and if not how I get it added (?))

As an Editor I want to easily add a new language to the list of languages that are supported so that it shows up as available

Whitespace in generated pages

It seems that Liquid leaves behind whitespace, even in statements that generate no output. This is most evident in the menu template, which has nested for loops that generate >50 kB of needless whitespace-only lines in every page.

It's not particularly important given modern broadband connections, but it would be nice to eliminate the whitespace during the generation process, preferably without fully minifying the output.

Jekyll and Markdown tutorial / readme

For non-technical editors

  • Pages are written in markdown (or html) using jekyll cms (which is static page generator - the raw pages are rendered to output using the theme and served up statically)
  • Markdown tutorial
    • Extras: footnotes, toc on page, how to do glossary and relative links generally
  • We use jekyll - what’s the simplest explanation we can give of the metadata
    • See this tutorial

Plan and implement redirect strategy

  • Analyse current handbook
    • Work out what is disappearing / merging
    • Work out what's staying
    • Work out where this redirects to
  • implement (use jekyll redirect plugin we suggest)

Make theme reusable by other Open Knowledge sites

This is something that I've mentioned a few times but I wanted to flag explicitly for discussion

This theme is now pretty nice and seems like it could become our standard theme for "handbook" or documentation sites. Concrete examples of immediate reuse include Data Patterns and OpenSpending community site.

What is the minimum needed to make this reusable for other (jekyll) sites? Do we need to split theme out to e.g. https://github.com/okfn/jekyll-template or can it stay here?

/cc @mintcanary

Glossary references - consider whether to do this in JS

atm i am preserving the special :term:... references that sphinx has in the markdown. I can auto convert these on the conversion from rst to markdown.

However, we could also keep something in and do some JS magic to convert these for readers to actually glossary references.

What's the benefit: it means that writers don't have to hard-code glossary html links - instead we can generate. It means we can move the glossary around. It means that glossary links work auto-magically in translation etc etc. It means we can change the name of a glossary item and not dig around to fix the source links.

Add and change right hand side buttons

  • Edit this page - both links are like buttons
  • change to Help and Instructions for "contributing" text
  • change Edit this page => Improve this page - more inviting

Link sections headings

Section headings (e.g. value stories on value stories section) do not link back to their main section as one would expect

Jekyll build fails locally

I get the following error when attempting to build locally

  Conversion error: Jekyll::Converters::Scss encountered an error converting 'css/main.scss'.
  Conversion error: undefined method `specificity' for [:not(.mm-subtitle)]:Array
jekyll 2.4.0 | Error:  undefined method `specificity' for [:not(.mm-subtitle)]:Array

/cc @mintcanary

Table of content

Should look as follows:

  • Home
  • Open Data Guide
    • Introduction
    • Why Open Data
    • What is Open Data
    • How To Open Up Data
    • So I’ve Opened Up Some Data, Now What?
    • Glossary
    • Appendices
  • Open Data Value Stories
  • Open Data Resources
  • Contribute
    • Contributing to the handbook
    • Adding a page to the guide
    • Editing a page in the guide
    • Translating the guide
    • Adding a glossary term
    • Translating the glossary
    • Markdown example
  • Credits

[super] Docs for Handbook Content Editors

Docs will live in contribute/index.md

Sections:

  • How our site and pages work
    • jekyll and markdown tutorial - #6
    • pages stored in github and auto-published for us
      • Permissions and workflow (how pull requests work)
      • Requesting direct edit access to the main repo (joining the editor team) - email these folks
  • Create a page
    • Log in
    • Creating a page in Github UI (need to be a repo owner?) - screenshot and highlight icon
    • Where to put pages … - if you want a page opendatahandbook.org/en/my-cool-new-page.html then create a page at /en/my-cool-page.md in the repo (note the .md extension indicating this is a markdown file)
    • Use this template
    • Save
    • (?) submit pull request
  • Edit
    • Go to page on site or in github and hit edit (easier on site)
  • optional power-user - you can clone the repo to your machine and edit files there!
    • clone the repo (or fork then clone)
    • commit
    • push
    • (submit pull request if not pushing direct)

localisation: current state and outstanding challenges

Current state of play

Much of the site is translatable:

  • Guide
  • Glossary
  • Value Stories

Some sections are not:

  • Resources
  • Credits

There are some challenges with managing translations in our use case. We've covered most of the territory, but some areas are left in need some work.

How it works

All these elements are used in various places in the code, usually while looping over pages:

What's working

  • Any page that has one or many translated versions will display links to them
  • Links in the main navigation are language aware (if I'm in the german guide, the links will be to other pages in the german guide)
  • The "internal TOC" of all guides is language aware

What's not

  • While the main navigation has language aware links, the title text is not language aware. As noted about, this is because it uses a rather naive loop, based on this data structure: https://github.com/okfn/opendatahandbook-v2/blob/gh-pages/_config.yml#L186
  • The website has no concept of state, so if a user is navigating, say, the german guide, and navigates to a language unaware page like credits - the user has moved back into english (all links from there will be "en" namespaced, and not "de"

Instructions for translators

  • Contact editor and request translation be setup
  • Editor copies across current guide content in english and records commit hash somewhere so we know what version they forked off
  • Editor sends response and they can start translating

Ideas

  • have a translated flag that is set to true when translation is 100% done. When not true we show a banner on page somewhere letting people know not translated and they can help out

Last updated date on each page

[random]

  • Last updated at top of page (just under author?)
  • How do we implement
    • Write in with post-commit hook to jekyll frontmatter (nice as fixed)
    • Do via javascript by pulling commit info from github api

User story: As a Reader I want to know when an article was last updated so that I know how up to date it was

sass errors/warnings on build

I just forked and built the handbook for the first time. On first generation of the site locally, I see the following errors from the sass compiler:

WARNING: The $display argument will be deprecated in future versions in favor of the display(){...} mixin.
         on line 11 of /Users/paulwalsh/code/projects/opendatahandbook/_sass/neat/settings/_disable-warnings.scss, in `-neat-warn'
         from line 39 of /Users/paulwalsh/code/projects/opendatahandbook/_sass/neat/grid/_row.scss, in `row'
         from line 931 of an unknown file, in `@content'
         from line 62 of /Users/paulwalsh/code/projects/opendatahandbook/_sass/neat/grid/_media.scss, in `media'
         from line 929 of an unknown file

WARNING: Resetting $display will be deprecated in future versions in favor of the display(){...} mixin.
         on line 11 of /Users/paulwalsh/code/projects/opendatahandbook/_sass/neat/settings/_disable-warnings.scss, in `-neat-warn'
         from line 64 of /Users/paulwalsh/code/projects/opendatahandbook/_sass/neat/grid/_to-deprecate.scss, in `reset-display'
         from line 984 of an unknown file, in `@content'
         from line 62 of /Users/paulwalsh/code/projects/opendatahandbook/_sass/neat/grid/_media.scss, in `media'
         from line 980 of an unknown file

any ideas?

Edit this page support

Nice link (maybe follows you down the page) for editing the page that takes you directly to github source (or, maybe, better prose.io)

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.