Skip to content

Instantly share code, notes, and snippets.

Jon Earley jonearley

Block or report user

Report or block jonearley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jonearley /
Last active Dec 11, 2019
Metadata component API

Metadata component API

Re: U-M Library Design System Metadata component


  • Term: The display text for a single field.
  • Description: A single description for its term, but a term can have many.
  • Field: The combination of a single term and its associated description(s).
View universal-header.json
"heading":"Discover what the library has to offer",
"name":"Library Website",
"description":"Go to the library's home on the web.",

[DRAFT] Drupal API

Documentation for the API between Drupal and Gatsby.

Content types


jonearley /
Last active Dec 13, 2018
Requirements for extending the Drupal json api for node pages with views to include breadcrumbs and weight.

Task: Add weight and breadcrumbs attributes to node pages.

Using the json api for "Jobs at the Library" Drupal node page as the example. For full:

Breadcrumb specs:

  • Start at the homepage.
  • Attach property of breadcrumbs with an array of objects as the value.
  • Each object in the array contains text and to. text is the page title. to is the alias to that page.
View _date_coverage.html.erb
<% @wmon = (1..12).to_a.unshift('--') %>
<% @wday = (1..31).to_a.unshift('--') %>
<div class="form-group <% if f.object.class.multiple? key %>multi_value<% end %>">
<p class="text-bold">Date Coverage</p>
<p class="help-block">The date range the work's data was created, as determined by the creator.</p>
<% if f.object.class.multiple? key %>
<ul class="listing">
View designer.html
<link rel="import" href="../notification-elements/notification-alert.html">
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
:host {
jonearley / gist:caf879bddcd46878db2b
Last active Aug 29, 2015
Self correcting Semantic URL slugs, Stack Overflow style.
View gist:caf879bddcd46878db2b
Self correcting Semantic URL slugs, Stack Overflow style.
For example, we have obj with pk: 1, title: "Hello World", and slug: "hello-world" -> ->
You can’t perform that action at this time.