UN Transparency Protocol (UNTP) documentation website.
All contributions to this project are done as GitHub Pull Requests. This means that you make your changes in a separate branch and then request for your changes to be "merged" via an approval workflow.
All content on the UNTP website is writting using the Markdown notation, a very simple text based editor. If unfamilair with markdown, we suggest you experiemtn with it on a markdown playground so that you understand how to create headings, bulleted lists, tables, and so on.
If you only need to make some very simple changes to an existing page (eg fix some typos or modify some content) then the simplest solutoin is just to use the online editor. On the bottom left of any UNTP website page there is an Edit this page
link.
Edit this page
link - you'll be presented with an editable version of the page in Markdown. Note that you can toggle between Edit
and Preview
tabs so that you can see how your Markdown will look. Complete all your changes to the page.Commit changes...
green button on the top right of the page. You'll get a pop-up with a commit message. Type a description of your changes (eg "fixed some typos") and ensure that the Create a new branch for this commit and start a pull request
option is selected. Then click on the Signoff and propose changes
green button. And on the next page you can edit your commit message if you wish - then click the Create pull request
green button.If you are going to be a regular contributor and/or you want to propose more significant multi-page changes in one request, then you should set yourself up with a local copy of the website where you can make as many changes as you like and test them before pushing a pull request to the main repository.
GitHub Desktop
-> Settings
-> Accounts
). This will ensure that you can see all the GitHub repositories that you also have access to online.File
->Clone Repository...
button top left of your GitHub Desktop client. You'll need to choose a local folder to put your UNTP repository clone. We suggest you create a GitHub
folder and keep all cloned repositories in it.
Checkout GitHub Desktop Cloning a repository help page for step-by-step instructions.
GitHub
local folder. Now you'll need to create your own branch in which to make changes. This is important - you should not make changes in the main branch as you will not be allowed to push them to the site. To make a local branch using your GitHub Desktop, make sure your current repository is spec-untp
the then click on current branch
and select new branch
. Give it any name like "untp-spec-changes" and create the branch as a copy of main
.
Checkout GitHub Desktop Creating a branch help page for step-by-step instructions.
main
and your local branch. When you select any branch, GitHub will ensure that the files you synchronised to your local folder are for that branch. So you always work on the same folder structure but the files you see will relfect the state of whichever branch you have selected in your Desktop client.spec-untp
->website
->docs
. There you'll see a list of folders that correspond to the UNTP site structure (about, specification, etc). Inside each folder is an index.md
file - that's the content that appears at the heading level (eg Business Case). Inside that folder you'll see the files that represent the pages under that heading. Any files with a .md
suffix are the Markdown files that hold the text fot that page. Any other files such as .png
files contain images that are referenced from that page..md
file you should immediately see that change reflected on your local UNTP website copy. This is a good way to test that your changes look right and there aren't broken links.commit
those changes in your local GitHub Desktop and provide a commit message just like you did for the online simple changes edit. That will save create a versioned change on your local GitHub.
Checkout GitHub Desktop Write a commit message and push your changes help page for step-by-step instructions.
Pull request
on your desktop. That will trigger the creation of a pull request on the "origin" GitHub repository where UNTP is maintained. You'll be redirected to the UNTP GitHub site online and will see the same pull request screen that you saw with the simple process described above.
Checkout GitHub Desktop Creating a pull request help page for step-by-step instructions.
The UNTP website is built using Docusaurus 2, a modern static website generator.
Note: You can copy code snipets below and paste them to your terminal, just remove
$
sign, that indicates that those are commands to execute in a terminal
To run it locally:
Applications
->Utilities
->Terminal
.ls
command will list the files in the current folder and cd someFolder
will move you to that folder. cd ..
will move you back up a folder level. Use ls
and cd
till you are in the website
folder of the UNTP repository.
$ cd ~/GitHub/spec-untp/website/
npm install --global yarn
. Yarn is a dependency manager that will keep all your local bits and pieces of website software up to date.
$ npm install --global yarn
yarn install --frozen-lockfile
to install the dependencies needed for the website (which includes docusaurus).
$ yarn install --frozen-lockfile
yarn start
. This will launch the website and open it in a browser windo on your local machine at http://localhost:3000/spec-untp/
. Whenever you make changes to UNTP Markdown files, you'll see the change on your local website.
$ yarn start
website
folder as described above and typing yarn start
. You don't need to re-install node or yarn or docusaurus.