Version 2 (modified by 10 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 a git repository available via the following steps:
- Grant yourself access to mfpl-suexec on octavia.mayfirst.org
- Checkout:
git clone mfpl-suexec@octavia.mayfirst.org:git-hub
- 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.
If you git push back to origin, it will automatically update the site.
If you download hugo locally, you can run:
themes/chavez/bin/build-sites ./
To build out the html in the public directory.
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 feeds from https://outreach.mayfirst.org/ and pulls in 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, here are the directions:
- The feeds will be added as Language Neutral by default - and if they are language neutral then they won't be pulled into either site. To fix this problem, the domain names of each feed should first be added to the mfc.module file in the outreach.mayfirst.org git repo (
gitosis@git.mayfirst.org:mfpl/outreach.git
). - Next, add the feed via the Drupal user interface on outreach.mayfirst.org:
- Clone an existing feeds importer on this page: https://outreach.mayfirst.org/admin/structure/feeds
- Add the URL for the feed on this page: https://outreach.mayfirst.org/import
- Once you have done one import, it will import on each cron job.
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.