| 1 | = The mayfirst.org web site = |
| 2 | |
| 3 | See the [wiki:communications-workflow communications workflow] for more information about the big picture. |
| 4 | |
| 5 | https://mayfirst.org is designed using the [http://gohugo.io/ Hugo] static content generator. |
| 6 | |
| 7 | It displays both static content and dynamic content |
| 8 | |
| 9 | == Static content == |
| 10 | |
| 11 | The static content is stored in a git repository available via the following steps: |
| 12 | |
| 13 | * Grant yourself access to mfpl-suexec on octavia.mayfirst.org |
| 14 | * Checkout: |
| 15 | {{{ |
| 16 | git clone mfpl-suexec@octavia.mayfirst.org:git-hub |
| 17 | }}} |
| 18 | * All static posts are in the top level directories content/es and content/en |
| 19 | * 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. |
| 20 | |
| 21 | If you git push back to origin, it will automatically update the site. |
| 22 | |
| 23 | If you download hugo locally, you can run: |
| 24 | |
| 25 | {{{ |
| 26 | themes/chavez/bin/build-sites ./ |
| 27 | }}} |
| 28 | |
| 29 | To build out the html in the public directory. |
| 30 | |
| 31 | == Dynamic content == |
| 32 | |
| 33 | 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). |
| 34 | |
| 35 | There are helper files in themes/chavez/bin for pulling in this content. |
| 36 | |
| 37 | == Localization == |
| 38 | |
| 39 | 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. |
| 40 | |
| 41 | Each piece of content designates the file with the corresponding translation from the other site (which is how the language links work). |
| 42 | |
| 43 | To create or fix translations, you may need to look in one of three places: |
| 44 | |
| 45 | * 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. |
| 46 | * In the config file (config_es.toml or config_en.toml) - these files contain some strings, like menus. |
| 47 | * In the translation files - the rest of the strings should be in data/translations. |
| 48 | |
| 49 | == Hacking == |
| 50 | |
| 51 | Most of the heavy lifiting comes from the theme (themes/chavez). That's where you will find the templates, css and javascript files. |