wiki:mayfirst.org

Version 7 (modified by Jamie McClelland, 3 years ago) (diff)

--

The mayfirst.org web site

See the communications workflow for more information about the big picture.

https://mayfirst.org is designed using the Hugo static content generator.

It displays both static content and dynamic content

Static content

The static content is stored in ownCloud.

To get access, login to our ownCloud install as mfpl-admin (password in keyringer) and share the mayfirst.org folder with your user.

  • All static posts are in the top level directories content/es and content/en
  • They are saved as markdown files with "front-matter" at the top providing some meta data, such as the title, the name of the corresponding page in other languages, the menu it should belong to, etc.

A cron job runs every ten minutes to sync and rebuild the site.

If you download hugo locally, you can run:

hugo server --config config_en.toml

To view the site locally.

Videos

We also have a system of posting videos (still in development).

The top level directory of the mayfirst.org ownCloud folder has a folder called "media" with both an "en" and "es" directory.

If you place a webm file in either directory it will be picked up on the next cron job (every 15 minutes) and a video page will be created in either content/en/video or content/es/video which will cause the video to be listed in either https://mayfirst.org/en/video or https://mayfirst.org/es/video.

Dynamic content

In addition, there is dynamic content that is pulled in via a cron job on the live server. The cron job pulls in a feed from https://outreach.mayfirst.org/ (appearing in left column of News section), a variety of member feeds and an iCal calendar from https://share.mayfirst.org/ (as configured in config_en.toml and config_es.toml).

There are helper files in themes/chavez/bin for pulling in this content.

If you want to add new feeds, edit config_en.toml or config_es.toml.

Localization

We essentially are building two different web sites that share the same theme. One is build in /en and the other in /es. One has content from content/es and the other from content/en.

Each piece of content designates the file with the corresponding translation from the other site (which is how the language links work).

To create or fix translations, you may need to look in one of three places:

  • In the content file itself. If the string is in an internal page, look in content/es or content/en for a file named after the one in the URL.
  • In the config file (config_es.toml or config_en.toml) - these files contain some strings, like menus.
  • In the translation files - the rest of the strings should be in data/translations.

Hacking

Most of the heavy lifiting comes from the theme (themes/chavez). That's where you will find the templates, css and javascript files.