cerner / cerner.github.io

Cerner Engineering blog
https://engineering.cerner.com
14 stars 28 forks source link

Engineering Health Blog

This site is built with Hugo. You will need to have it installed for running the site locally.

This project contain two branches:

Setup

git clone git@github.com:cerner/cerner.github.io.git
cd cerner.github.io
git checkout source

Running Locally

hugo server

Contributing

Writing a New Blog Post

When writing a blog post, all content is contained in the source branch. Content is then generated into the main branch for site generation.

To create your new post, you can use Hugo's archetype for the new post:

# Replace {name} with the short name of your post
hugo new post/{name}/index.md

This file will then be created with the following examples if we used "hello-world" for the {name}.

---
title: "Hello World"
date: 2020-08-03
authors: [""]
thumbnail: ""
tags: []
---

Authors

When adding authors, it is recommended that you add information about the author, which would include a profile photo. This can created with the following archetype:

hugo new authors/{first}-{last}/_index.md

You will want to add a photo of you to this directory. You can then edit the _index.md with the basic metadata. Here is an example:

---
name: "Jane Doe"
images: ["jane.jpg"]
---

You can add your twitter handle if you want, but that is an optional field.

Submitting a Change

  1. Make your changes to the source branch
  2. Test your changes locally
  3. Submit a pull request to the source branch with your changes

Once your pull request is accepted, someone with commit privileges will regenerate the main branch and push to Github. Your changes will then be live.

Publishing

Publishing is automated at the point of merging to the source branch through GitHub Actions. The workflow will use a GitHub token scoped to the workflow action for deploying the content to the main branch. At the point of merge, you will see the GitHub Action begin in the Actions view. Once the deployment is completed, a new commit will be created which links to the commit on the source branch that triggered the deployment.