- Create a branch (or a fork)
- Make your changes, commit to the branch
- Create a Pull Request (PR)
Note: the main
branch is protected and can only be updated via PR.
Once merged into the main branch, the updated production website will go live within about a minute.
There are 3 types of content stored in different directories:
-
_content/*.md
(with underscore) holds complex top-level pages. These pages are built in sections (each file in the respective subfolder) in order to take advantage of different layouts for each section. -
content/*.md
(without underscore) holds simple interior pages. The directory structure here will be mirrored in the path/URL to the rendered page. -
/index.md
andlayouts/home.html
control the home page content. -
Blog content is hosted via Medium.com. Additional detail is in the below section.
Simple content updates, or even creating simple interior pages can be done with no HTML or Jekyll knowledge.
For advanced contributers creating more complex changes and formatting, please keep in mind:
- Run the app locally to get a full preview of changes as rendered.
- See the CSS section to re-run the purge commands, which is particularly important if you want to make use of bootstrap CSS that is not yet in use on the site.
Content pages have the .md
markdown file extension. This allows us to write simple content as markdown, but we can also mix in HTML if warranted.
Note, pages must have the "YAML front-matter" data at the top of the page. It sounds complicated, but copy/paste an existing page to start. The YAML looks like:
---
layout: interior # Which page layout to use
title: Benefits # Title to display (e.g. at top of page)
nav_highlight: join # The top nav link that should be highlighted, if applicable
permalink: join/benefits # Optionally supply an alternative path for the generated page
include_join_us: true
---
## My Subheading
Some example content followed by a:
* bulleted
* list
... more content...
Content can be edited directly in GitHub. To do more complex work such as changing templates, styles, etc. you can run locally on the desktop.
See jekyll docs for more detail, but the TLDR is:
- Install ruby if not present
gem install jekyll bundler
bundle install
bundle install jekyll serve -l --watch
We also have a convenience script to run the server:
bash start.sh
It is recommended that you use version managers for node and ruby - e.g. RVM, NVM.
Your mileage may vary... the Docker approach has had mixed results, and any PR to iron this out would be appreciated.
Make sure Docker is installed.
docker-compose up
The app should now be available at: http://localhost:4000/
Note: if you set the baseurl
in _config.yml
, the home page will be at that path, e.g http://localhost:4000/hamster/ .
If you change config, you must restart.
The site uses bootstrap 4.x as the baseline set of styles, and many of the built in utilities. See the bootstrap docs for general documentation on the bootstrap CSS classes. Other customizations are reflected in:
css/site.css
includes custom styles and overrides for our site.css/greenhouse.css
is a central place to store the file (which we can upload to greenhouse) that has some styling overrides for greenhouse defaults. This is used in iframes for our job listings.
To trim unused CSS, we can use purgecss. This allows us to only serve up the css classes that are really needed. This looks at the file in the css/vendor/
directory, then writes a version into css/build
that only includes css classess actually used in the code.
bash prepcss.sh
Reference the appropriate file in _includes/template_meta.html
, using the css/vendor
or css/build
path. If you are actively playing with styles, use the file in vendor/
and then switch back when done.
<link
href="/css/vendor/bootstrap.min.css"
rel="stylesheet"
/>
- Install/use node
12.18.x
(simplynvm use
if running nvm) - Install purgecss
npm i -g purgecss
We can do a client-side redirect by using the redirect template. To do so put a simple markdown file in the /redirects/
folder. See the file /redirects/cio-sp3
for an example.
An explanation of the approach is here: https://superdevresources.com/redirects-jekyll-github-pages/
To contribute blog content, you need to setup an account and be associated as an author for the Pluribus "publication." Then you can draft and submit stories.
- Create an account at Medium.com
- Add appropriate profile info including a photo
- Provide your Medium username to an editor to be added to the publication. There are two roles in medium:
writer
: writes articles, but can't publish themeditor
: can edit submitted articles and publish, as well as add other users
Medium attributes each story (the "by-line") to the author based on their account information. We have created an "editors" account when we want the article to be written as the company vs. an individual person. The guidance on using those is:
- Use the individual account (
@jane_doe
) to write and submit the article when it is meant to be from that person. This could be a technical how-to, an individual perspective, or some other article where it makes sense to be from an individual. - Use the editors account (
@pluribusdigital_editors
) to write and submit the article when it makes more sense to be from the company generally. This could be news announcements, or some article with many authors or perspectives.
- Login to medium.com
- Select your profile image at the top-right of the screen
- Select New Story from the menu
- Begin to draft the article (see conventions below)
- At some point before publishing
- select the ellipses (...) next to the Publish button
- select Add to Publication
- select PluribusDigital
- Select and Continue
- Submit the article
- Let an editor know that the article is available for review & publishing
- Keep writing tone and style consistent with the brand voice, with content that reflects well on the brand
- Target an appropriate length - generally working to trim length and get to the point - but varies by type of post (a technical article may be different than a news update)
- Include at least one image that can make a good "cover" image
- Include descriptive alt text for all images
- Make good use of headings and other techniques to make content readable and scannable
Our job board is integrated in two places:
- Lob List on Main JOIN US Page:
_content/join/02_openings.md
pulls in the listing of current openings. - Openings Detail View:
content/join/openings.md
is the page that houses the job detail, and is the path that greenhouse points to.
The file css/greenhouse.css
contains custom CSS additions for the contents of the greenhouse iframe. In the greenhouse configuration, you can either point to a URL for the file, or upload directly. So far we've uploaded directly, but just verify on the greenhouse config if it is not working as desired.
We use Google Analytics to gather site traffic data. Contact the helpdesk to be added as appropriate.
See here: https://www.tendenci.com/help-files/how-update-google-map-embedded-your-webpage/