Read-only mirror of https://github.com/opendata-swiss/ogd-handbook-site — opendata.swiss. Issues & pull requests at the source.
  • CSS 45.7%
  • HTML 28.2%
  • Python 12.4%
  • JavaScript 11.3%
  • Makefile 1.3%
  • Other 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nataliia Kovalchuk e970c595b3
Merge pull request #31 from opendata-swiss/remove_red
Redirects using .htaccess are not working for github pages
2024-11-21 14:41:48 +01:00
.github/workflows Merge branch 'master' into rebase_master 2024-11-21 14:34:20 +01:00
content@b5f6f6dec7 feat: Remove redirect from head and it via content 2024-11-21 14:23:17 +01:00
extra fix: Redirects using .htaccess are not working for github pages 2024-11-21 14:41:27 +01:00
pandoc Executable bit 2018-04-04 12:01:59 +02:00
plugins Updated i18n config for JINJA_ENVIRONMENT 2017-03-22 14:37:28 +01:00
theme feat: Remove redirect from head and it via content 2024-11-21 14:23:17 +01:00
.gitignore Autodeployment script 2016-02-10 15:33:46 +01:00
.gitmodules Use https for submodule 2017-04-18 14:39:05 +02:00
deployer.py Publish settings 2016-06-29 15:37:07 +02:00
develop_server.sh Initial release 2015-11-06 16:27:18 +01:00
fabfile.py Initial release 2015-11-06 16:27:18 +01:00
MAINTENANCE.md Content updated to mention BFS or portal team 2019-07-17 09:31:40 +02:00
Makefile Docexport optional 2018-11-22 22:49:35 +01:00
pelicanconf.py Fix language selector 2020-06-30 14:21:44 +02:00
publishconf.py Change siteurl to new github-pages one 2020-06-30 14:20:37 +02:00
README.md Update README.md 2020-07-14 11:59:41 +02:00
requirements.txt Bump pygments from 2.2.0 to 2.7.4 2021-03-30 00:25:19 +00:00
runtime.txt Runtime 3.6.7 2018-11-22 23:10:36 +01:00
update_translations.sh Updated translations, moved custom CSS, thumbnail support 2016-06-15 11:57:54 +02:00

OGD Handbook Site

This repository contains web application source code for the previous version of the OGD Handbook. For the current OGD Handbook code, see https://github.com/opendata-swiss/ogdch-handbook.

This version of the Handbook site is currently deployed to http://opendata-swiss.github.io/ogd-handbook-site/pages/index for archiving.

Overview

The web frontend for the OGD Handbook is documented here. We use the Pelican static site generator for Python which you can learn about at docs.getpelican.com. It can be easily and quickly deployed to any standard web server, as detailed below.

The Handbook content is written using Markdown. This is maintained in a separate repository submoduled under content/handbook.

The Python-based wiki realms.io was used to create a collaborative environment for editing content, see deployment instructions. We are using our own fork with Docker-based customizations.

We are using the Pelican Bootstrap 3 theme. For more information see the project's homepage, Pelican's documentation on themes, and the Bootstrap site.

The following documentation deals with installation of the web frontend.

Setup

  1. Clone this repository, then go into the folder and update submodules:
git submodule update --init --recursive
  1. Create and initialise the virtual environment:
virtualenv .venv
. .venv/bin/activate
pip install -r requirements.txt
  1. Run the development server
./develop_server.sh start 8080

You can now access the website on http://localhost:8080

If you see a "Directory listing", then restart the server - this is a known Pelican weirdness:

./develop_server.sh stop
./develop_server.sh start 8080

Configuration

Please see Pelican documentation for information on configuring for deployment.

Contribution guidelines

We accept pull requests to this repository for changes to the web site only.

Deployment notes

The master branch of this repo is automatically deployed to GitHub Pages.

Document export

To generate document versions of the Handbook pages, we use pandoc. The latest version (1.15+ is required) can be installed by downloading a binary from this page.

To also create Word (DOCX) files, you need to install LibreOffice and unoconv (i.e. sudo apt-get install libreoffice unoconv).

The files will then be generated in the /export folder of output using:

make doc_export

Note: if you are seeing an ERROR: No module named 'uno' error: copy /usr/bin/unoconv to /usr/local/bin/unoconv, and replace #!/usr/bin/env python3 to just #!/usr/bin/python3 in this file.

Translations

Using Babel for Flask, we can keep the theme translations up to date. Use the script in the root folder:

./update_translations.sh

To add another language:

cd theme/translations
pybabel init -i messages.pot -d . -l de

Who do I talk to?

Send us a note via the contacts on the homepage if you have a question.