Jen Wachter

Web Developer

Hub

The Hub launched in 2013 as the online source of news from Johns Hopkins University. Since then, it has grown into the home of not only news, but also announcements, events, photo galleries, and faculty profiles.

The Hub uses WordPress as its content management system, but only a small portion of the content is crafted in WordPress. There are two types of content on the Hub:

  • Content that is managed by rewrite rules. The core of the Hub is its article, announcement, event, gallery, and faculty profile pages, whose data is fetched from the Hub API. Requests for these types of content are caught by custom rewrite rules, passed to a controller to facilitate fetching the data from the API, transforming it as needed to populate the data model, which is then passed to the view layer to render the content to the user.

  • Content built in WordPress. The remaining content on the Hub consists of mostly static pages and editorially curated collections of content. These pages are crafted in WordPress using a modular page-building system created with the Advanced Custom Fields plugin to create a block-style editor years before it became the standard with the Gutenberg editor. Examples of this type of content include the homepage, topical section fronts, and Johns Hopkins Magazine issues.

Hub API content picker plugin

Selecting content from the Hub API to include on WordPress-crafted pages of the Hub is accomplished via the GitHub Hub API Content Picker plugin, developed to work with the Advanced Custom Fields plugin. Built in React and fully tested using JavaScript Testing library and Jest, the plugin validates user designations before a post can be saved and allows field administrators to define rules around the types of content that can be selected.

Conversions

Conversions are actions that a user may take to demonstrate an interest in a piece of content; for example, when a user shares an article, a conversion is sent to the Hub API via a POST request. Some conversions, such as sharing an article on social media, are given a higher weight than other conversions, such as simply viewing an article.

Using the conversion data, every article, announcement, and event is assigned a score, which is a numerical representation of that item’s popularity on the Hub. Scores are calculated every 15 minutes by tallying the conversions attributed to each content item using a sliding 3-day window of data. Scores are used to populate various “trending” feeds across the Hub.

Evolution over the years

  • 2013: Hub website launches. At launch, both the website’s front and back ends are built using Slim Framework as the foundation for the MVC application. A streamlined, custom content management system controls the creation of pages like the homepage and section fronts, while article pages are generated from data in the Hub API.
  • 2014: Announcements section launches. Announcements, which were previously communicated to faculty, staff, and students through a daily email, are moved into the Hub. Having a presence in the Hub allows announcements to be more detailed, as the entire content of an announcement is no longer constrained to an email alongside other announcements. Additionally, the creation of the daily email is moved to an automated process that generates the email using API data and schedules it for delivery using the MailChimp API.
  • 2015: At Work section launches. For over 40 years, the Gazette was the source of news for faculty, staff, and students at Johns Hopkins University. Publishing ceased in 2015 in favor of the At Work section on the Hub.
  • 2016
    • Events section launches. Stakeholders from around the university are invited to submit events for inclusion in the Hub event calendar. Divisions from across the University begin using the Hub calendar to promote their events. Upcoming events are added to the daily announcements email.
    • Integration with CDN. The Hub experienced its first significant downtime on June 23, 2016, when a Hub article made it to the top 10 of shared posts on Reddit. The sudden spike in global traffic crashed the server that served the Hub and prompted an expedited effort to integrate CDN caching and cloud storage (using Akamai). The Hub has experienced nearly 100% uptime since the integration.
  • 2017: Migration to WordPress. The custom content management system is retired in favor of WordPress. A series of migration scripts are developed to automate the migration process, eliminate frontend downtime, and minimize backend downtime.
  • 2020
    • Faculty Experts guide launches. Enables members of the media to easily find subject matter experts through a searchable database of relevant faculty and topics.
    • Images are made responsive. This led to lower bandwidth usage, higher-quality images, and faster load times across all devices.
  • 2021: Stand-alone galleries launch. Photo galleries no longer need to be a part of another piece of content; they can stand on their own.
  • 2022: Automatic publication issue generation. Each publication issue is automatically generated in WordPress using data from the Hub API, while still allowing editors to add/modify/remove content as they see fit.