cerner / cerner.github.io

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

Transitioning to Hugo for static site generation #136

Closed cchesser closed 4 years ago

cchesser commented 4 years ago

We have been maintaining the site with Jekyll, but that has a burden of maintaining several of the dependencies (Ruby and all the related gems). We are wanting to make it easier for other Cerner engineers to contribute to this for generating content. It is desirable to evaluate to moving to using Hugo for our site generation for the following benefits:

Preview of this site can be seen on this draft PR that is collected all the changes: #147

List of TODOs

Bonus

This are tasks that are identified, which are not required but tracking them so they are not lost.

mjhenkes commented 4 years ago

I put out a pr to setup heroku pr deployments for the new hugo version of the site. https://github.com/cerner/cerner.github.io/pull/141

cchesser commented 4 years ago

Thank you @mjhenkes!

cchesser commented 4 years ago

I applied a9e9c78 to add pagination support to the site. It flexes on the first page to have the main featured content.

cchesser commented 4 years ago

Applied changes with b1de1f0, which updated posts using code fences to indicate larger blocks to have line numbers. Also, updated the main logo image (slightly cleaner look). Marking the "Code Syntax highlighting doesn't have line numbers anymore" as done.

cchesser commented 4 years ago

Applied changes with 91d8dd7, which now hosts a tech-talks page, with embedded YouTube players which are based on playlists, with a primary feature on our Tech Talks playlist (the one that routinely gets content). Then there are groups of cards (by 3), for all the other playlists on our YouTube channel. By having embedded players for the playlists, they will stay current without changing the page. The only time we need to change the page, is when there is a new playlist (yearly with DevCon).

I also applied aliases for both the open-source + tech-talks to map to what they were before if there were any direct links to these pages. I follow-up (which isn't necessary), is the tech-talks page has a lot of boilerplate Bootstrap content, which I could simplify with Hugo shortcodes. Will add that to the lists of TODOs, with an indicator is bonus.

Screen Shot 2020-07-22 at 11 39 15 PM
cchesser commented 4 years ago

Applied fb55f2e which resolves all the post_url references, using Hugo's ref links (which also statically validates the reference).

cchesser commented 4 years ago

Applied df3c797 which decorates links with Cerner blue for content pages (blog articles), but not on links on the landing page (blog posts in the card views).

links
cchesser commented 4 years ago

Added several changes (1ff3e033279d5ae460122a858d6d5f5144ce3cfa, df470a6e55d1ece25187e7792407d86c2b515120) which support a Lunr search across a generated JSON file created from Hugo site generation. All content which is being generated is therefore searchable.

When testing out the search, we are now generating pages for authors. Therefore, you can search for author, and get to a generated page of all the posts they have created. When doing this, I discovered I needed to clean-up our authors front-matter for all the articles that had multiple contributors. Broader set of changes applied here: de53c92cfd2c95a58e8669f0c212332e653caba2

cchesser commented 4 years ago

Applied several feedback changes on the site via: 9fb2198

cchesser commented 4 years ago

Example differences on banner / title:

Screen Shot 2020-07-29 at 12 05 37 AM
cchesser commented 4 years ago

Fixed the navbar expansion when on a mobile device (was a bug with jQuery 3.5.0), so updated to 3.5.1 that fixed it: 7bd0c89

Example on devtools simulator for phone (before the expansion wouldn't even work): Screen Shot 2020-07-29 at 11 06 45 PM

This set of changes also fixed some other weird quirks when further testing: