Slovenski prevod publiccode.eu
 
 
 
 
Go to file
max.mehl c045eb8384 meh, forgot slash... 2017-09-08 11:27:42 +02:00
site Merge branch 'master' of git.fsfe.org:pmpc/website 2017-09-08 11:13:01 +02:00
.drone.yml I'm with stupid <-- me! 2017-06-13 10:09:53 +02:00
.gitignore split config files in separate languages and concatenate them during build 2017-09-07 16:59:01 +02:00
000-default.conf meh, forgot slash... 2017-09-08 11:27:42 +02:00
CONTRIBUTORS.md added myself to the contributors list 2017-03-20 20:56:31 +01:00
Dockerfile no longer use old signature database and replace by forms DB 2017-09-04 12:34:06 +02:00
README.md formatting 2017-09-07 23:08:56 +02:00
TRANSLATE.md Added push instructions 2017-09-08 11:16:25 +02:00
hosts Added playbook for Ansible 2017-06-13 08:54:28 +02:00
playbook.yml Forgot to update the SSL domains. Fixes #86 2017-09-08 08:51:28 +02:00

README.md

PMPC Web Site

Build Status

This website is the core of the "Public Money, Public Code" campaign. It is based on Hugo, a modern static website generator.

The page is visible at publiccode.eu. Please do not spread this URL. The website requires authentication to be visited. Username is pmpc, password is publicmoneypubliccode. Please do not spread this information to outside people not involved in the website development.

Contributing to the website

Prerequisites

In order to modify the website, you need hugo and git installed on your computer. If Hugo isn't available in your package manager, obtain it from its official website. We tested the website build with Hugo from version 0.20.7 upwards. Please make sure that you use an as recent version as possible to avoid errors.

Configuring Git

First of all, you'll need an account on git.fsfe.org. In the FSFE's wiki, you'll find information about our Git service, how to get access, and some guides for basic procedures like configuration, commits, and pushes.

As part of the campaign team you can get full write access to this repository. Please contact one of pmpc's admins to give your account the necessary privileges.

Cloning the website

Although the mentioned Git guides will enable you to understand how to download the website's repository, here's a short howto: Navigate to a directory on your computer where you want the PMPC website to be stored. In this example, it's FSFE/PMPC/website in your user's directory.

mkdir -p ~/FSFE/PMPC/                           # Create the directory if it doesn't exist yet
cd ~/FSFE/PMPC/                                 # go to the newly created PMPC directory
git clone git@git.fsfe.org:pmpc/website.git     # clone the website to the folder website

In the newly created folder pmpc-website you'll find all source files the website consists of now. The hugo files are located under site/, whereas in the root directory you'll only find files informational files and those relevant for our build process (Drone, Ansible, Docker, Apache).

Translate

Visit TRANSLATE.md for detailed instructions how to translate publiccode.eu.

Build locally

To see a preview of the website you need to have Hugo installed and be able to execute Bash scripts in your command line.

  1. Navigate to the website's root directory (in the last example ~/FSFE/PMPC/website/) and open a terminal window there. Type in git pull. This will get the latest changes from the server
  2. In the terminal, execute cd site/ to navigate in the right directory for hugo's website build. You are now in ~/FSFE/PMPC/website/site/
  3. In your terminal, execute ./build/build.sh server. This command will build the website and enable you to browse the result on your computer only. Open localhost:1313 in your web browser to see it.

If you want to make changes to the official website, please read our Git guides. There you'll find out about the necessary commands pull, status, add, commit, or push.

Beginners can directly commit to the repository which saves them some steps, but they have to ask @max.mehl or @jonas in advance to give them the necessary permission. For more experienced Git users we recommend the Fork & Pull Request workflow, which you'll also find in the wiki's Git Guides section (not available yet).

Important file paths

The website structure is very easy. The most important files and directories are:

  • site/config-static.toml: Static texts and URLs which are the same for any language
  • site/languages/strings.{en,fr...}.toml: Headlines, site title, many texts for the various languages.
  • site/content: Markdown-files for sub-pages like /openletter, can be translated
  • site/data/{en,de...}/share: Services and their very short translatable strings where people can share to. Is being used in the "Spread" section and the left-side sharing icons
  • site/static/: CSS, images, and Javascript files for the design.
  • site/static/css/custom.css: File where all custom CSS code should be written to.
  • site/layouts/: HTML structure (scaffold) for the website. Useful if you want to add another section or modify anchor links or CSS classes.
  • site/layouts/page: Template for a sub-page like /privacy
  • site/layouts/shortcodes: HTML/Hugo code which can be important from within a Markdown file
  • site/public/: Built files which are used to display the website. Generated by running hugo.

Technical information about the online build

The FSFE uses Drone to automatically deploy the PMPC website. The website is automatically deployed when there's a push to the master branch of the repository, as well as once an hour (to update signatures).

This is the latest build status:

Build Status