SlideShare a Scribd company logo
1 of 32
Building Books from Static Sites
Digital (and print) publishing with the JAMstack
Eric Gardner
Lead Developer, Rumors
Background
Digital Publishing at the Getty
• Mandate: publish the museum’s collection catalogues in a digital format
• Attempts to shoehorn academic books into a CMS didn’t work very well
• Team of 2 (developer, product manager) embedded in a larger print
publishing team
• Didn’t want to lose the beautiful design and long-term availability of printed
books
Web books on the JAM Stack
• Ancient Terracottas from South Italy and Sicily, Maria Lucia Ferruzza
• Roman Mosaics in the J. Paul Getty Museum, Alexis Belis
• Ancient Lamps in the J. Paul Getty Museum, Jean Bussiere and Birgitta Lindros Wohl
• Many more at www.getty.edu/publications/digital/
Tech Stack
• Middleman static site generator (easy to extend in Ruby)
• Plain text back-end (markdown & YAML files), stored on GitHub
• Vue.js and other javascript libraries for interactive UI elements
• PrinceXML and CSS3 for PDF generation at build-time
Features
Book-like reading experience
Full-text seach using Lunr.js (no server required)
pages = sitemap.resources.find_all { |p| p.source_file.match(/.md/) }
entries = []
pages.each_with_index do |page, index|
entry = {
:id => index,
:title => page.data.title,
:url => page.url,
:content => page.render({:layout => false }).gsub(
%r{</?[^>]+?>}, '' )
}
entries << entry
JSON Index template (content.json.erb)
// Feed data into Lunr index
function populateIndex(data) {
var index = lunr(function(){
this.field('title', { boost: 10 });
this.field('content');
this.ref('id');
});
data.forEach(function(item) {
index.add(item);
});
return index;
}
Basic Lunr setup
Deep-zoom images using Leaflet.js
Dynamic maps using Leaflet.js
Dynamic UI components using Vue.js
Automatic PDF & Epub generation
}
@page:left {
margin-bottom: $bottom-margin;
margin-left: $outer-margin;
margin-right: $inner-margin;
margin-top: $top-margin;
@bottom-left {
content: counter(page);
font-family: $base-font-family;
font-size: $page-number-size;
}
}
@page:right {
margin-bottom: $bottom-margin;
margin-left: $inner-margin;
margin-right: $outer-margin;
margin-top: $top-margin;
@bottom-right {
content: counter(page);
font-family: $base-font-family;
page: spread-bleed;
page-break-after: always;
width: $bleed-width;
}
%print-page-content {
color: $print-text-color;
column-count: 2;
column-fill: auto;
column-gap: ($print-base-spacing * 2);
font-size: $print-base-font-size;
a[href] {
color: $print-text-color;
prince-link: none;
text-decoration: none;
}
p {
margin: 0;
+ p { text-indent: $print-paragraph-indent; }
}
h2, h3, h4, h5, h6 {
CSS @page rules
Takeaways
1. Building things that last
2. Cross-disciplinary collaboration
http://blogs.getty.edu/iris/an-editors-view-of-digital-publishing/
3. Development of Quire, an open-source
digital publishing framework
https://github.com/gettypubs/quire
Acknowledgements
Open-source tools that made this project possible
Build things that last

More Related Content

Similar to Building books from static sites: Digital (and print) publishing with the JAMstack

What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2Aileen Buckley
 
Mongo db washington dc 2014
Mongo db washington dc 2014Mongo db washington dc 2014
Mongo db washington dc 2014ikanow
 
Learn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBLearn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBMarakana Inc.
 
METS Navigator: A METS-based Display and Navigation Utility for Multi-Part Di...
METS Navigator: A METS-based Display and Navigation Utility for Multi-Part Di...METS Navigator: A METS-based Display and Navigation Utility for Multi-Part Di...
METS Navigator: A METS-based Display and Navigation Utility for Multi-Part Di...Jenn Riley
 
JavaScript!
JavaScript!JavaScript!
JavaScript!RTigger
 
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsThe Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsMatias Cascallares
 
Starting with MongoDB
Starting with MongoDBStarting with MongoDB
Starting with MongoDBDoThinger
 
Social Data and Log Analysis Using MongoDB
Social Data and Log Analysis Using MongoDBSocial Data and Log Analysis Using MongoDB
Social Data and Log Analysis Using MongoDBTakahiro Inoue
 
Elasticsearch first-steps
Elasticsearch first-stepsElasticsearch first-steps
Elasticsearch first-stepsMatteo Moci
 
Django Overview
Django OverviewDjango Overview
Django OverviewBrian Tol
 
Tools that get you laid
Tools that get you laidTools that get you laid
Tools that get you laidSwizec Teller
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationSean Burgess
 
Introducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsIntroducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsRichard Rodger
 
1403 app dev series - session 5 - analytics
1403   app dev series - session 5 - analytics1403   app dev series - session 5 - analytics
1403 app dev series - session 5 - analyticsMongoDB
 
Sven Kreiss, Lead Data Scientist, Wildcard at MLconf ATL - 9/18/15
Sven Kreiss, Lead Data Scientist, Wildcard at MLconf ATL - 9/18/15Sven Kreiss, Lead Data Scientist, Wildcard at MLconf ATL - 9/18/15
Sven Kreiss, Lead Data Scientist, Wildcard at MLconf ATL - 9/18/15MLconf
 
Interactive Kafka Streams
Interactive Kafka StreamsInteractive Kafka Streams
Interactive Kafka Streamsconfluent
 
Navigating the Wide World of Data Visualization Libraries
Navigating the Wide World of Data Visualization LibrariesNavigating the Wide World of Data Visualization Libraries
Navigating the Wide World of Data Visualization LibrariesKrist Wongsuphasawat
 
MongoDB at RubyEnRails 2009
MongoDB at RubyEnRails 2009MongoDB at RubyEnRails 2009
MongoDB at RubyEnRails 2009Mike Dirolf
 

Similar to Building books from static sites: Digital (and print) publishing with the JAMstack (20)

What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2
 
Mongo db washington dc 2014
Mongo db washington dc 2014Mongo db washington dc 2014
Mongo db washington dc 2014
 
Learn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBLearn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDB
 
METS Navigator: A METS-based Display and Navigation Utility for Multi-Part Di...
METS Navigator: A METS-based Display and Navigation Utility for Multi-Part Di...METS Navigator: A METS-based Display and Navigation Utility for Multi-Part Di...
METS Navigator: A METS-based Display and Navigation Utility for Multi-Part Di...
 
JavaScript!
JavaScript!JavaScript!
JavaScript!
 
JS Essence
JS EssenceJS Essence
JS Essence
 
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsThe Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
 
Starting with MongoDB
Starting with MongoDBStarting with MongoDB
Starting with MongoDB
 
Social Data and Log Analysis Using MongoDB
Social Data and Log Analysis Using MongoDBSocial Data and Log Analysis Using MongoDB
Social Data and Log Analysis Using MongoDB
 
Elasticsearch first-steps
Elasticsearch first-stepsElasticsearch first-steps
Elasticsearch first-steps
 
Django Overview
Django OverviewDjango Overview
Django Overview
 
Tools that get you laid
Tools that get you laidTools that get you laid
Tools that get you laid
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
 
Introducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsIntroducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.js
 
20120816 nodejsdublin
20120816 nodejsdublin20120816 nodejsdublin
20120816 nodejsdublin
 
1403 app dev series - session 5 - analytics
1403   app dev series - session 5 - analytics1403   app dev series - session 5 - analytics
1403 app dev series - session 5 - analytics
 
Sven Kreiss, Lead Data Scientist, Wildcard at MLconf ATL - 9/18/15
Sven Kreiss, Lead Data Scientist, Wildcard at MLconf ATL - 9/18/15Sven Kreiss, Lead Data Scientist, Wildcard at MLconf ATL - 9/18/15
Sven Kreiss, Lead Data Scientist, Wildcard at MLconf ATL - 9/18/15
 
Interactive Kafka Streams
Interactive Kafka StreamsInteractive Kafka Streams
Interactive Kafka Streams
 
Navigating the Wide World of Data Visualization Libraries
Navigating the Wide World of Data Visualization LibrariesNavigating the Wide World of Data Visualization Libraries
Navigating the Wide World of Data Visualization Libraries
 
MongoDB at RubyEnRails 2009
MongoDB at RubyEnRails 2009MongoDB at RubyEnRails 2009
MongoDB at RubyEnRails 2009
 

Recently uploaded

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 

Recently uploaded (20)

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 

Building books from static sites: Digital (and print) publishing with the JAMstack

  • 1. Building Books from Static Sites Digital (and print) publishing with the JAMstack Eric Gardner Lead Developer, Rumors
  • 3.
  • 4. Digital Publishing at the Getty • Mandate: publish the museum’s collection catalogues in a digital format • Attempts to shoehorn academic books into a CMS didn’t work very well • Team of 2 (developer, product manager) embedded in a larger print publishing team • Didn’t want to lose the beautiful design and long-term availability of printed books
  • 5. Web books on the JAM Stack • Ancient Terracottas from South Italy and Sicily, Maria Lucia Ferruzza • Roman Mosaics in the J. Paul Getty Museum, Alexis Belis • Ancient Lamps in the J. Paul Getty Museum, Jean Bussiere and Birgitta Lindros Wohl • Many more at www.getty.edu/publications/digital/
  • 6. Tech Stack • Middleman static site generator (easy to extend in Ruby) • Plain text back-end (markdown & YAML files), stored on GitHub • Vue.js and other javascript libraries for interactive UI elements • PrinceXML and CSS3 for PDF generation at build-time
  • 9.
  • 10. Full-text seach using Lunr.js (no server required)
  • 11.
  • 12. pages = sitemap.resources.find_all { |p| p.source_file.match(/.md/) } entries = [] pages.each_with_index do |page, index| entry = { :id => index, :title => page.data.title, :url => page.url, :content => page.render({:layout => false }).gsub( %r{</?[^>]+?>}, '' ) } entries << entry JSON Index template (content.json.erb)
  • 13. // Feed data into Lunr index function populateIndex(data) { var index = lunr(function(){ this.field('title', { boost: 10 }); this.field('content'); this.ref('id'); }); data.forEach(function(item) { index.add(item); }); return index; } Basic Lunr setup
  • 15.
  • 16. Dynamic maps using Leaflet.js
  • 17.
  • 18. Dynamic UI components using Vue.js
  • 19.
  • 20. Automatic PDF & Epub generation
  • 21.
  • 22. } @page:left { margin-bottom: $bottom-margin; margin-left: $outer-margin; margin-right: $inner-margin; margin-top: $top-margin; @bottom-left { content: counter(page); font-family: $base-font-family; font-size: $page-number-size; } } @page:right { margin-bottom: $bottom-margin; margin-left: $inner-margin; margin-right: $outer-margin; margin-top: $top-margin; @bottom-right { content: counter(page); font-family: $base-font-family; page: spread-bleed; page-break-after: always; width: $bleed-width; } %print-page-content { color: $print-text-color; column-count: 2; column-fill: auto; column-gap: ($print-base-spacing * 2); font-size: $print-base-font-size; a[href] { color: $print-text-color; prince-link: none; text-decoration: none; } p { margin: 0; + p { text-indent: $print-paragraph-indent; } } h2, h3, h4, h5, h6 { CSS @page rules
  • 24. 1. Building things that last
  • 26.
  • 27.
  • 29. 3. Development of Quire, an open-source digital publishing framework
  • 31. Acknowledgements Open-source tools that made this project possible

Editor's Notes

  1. Hi everyone! Thanks so much for being here this evening. My name is Eric Gardner. I’m a software engineer at Rumors, a design studio in Portland. I’ve been passionate about the technology of the “JAM Stack” since before that acronym existed! Tonight I’d like to talk about one application of this technology that I hope you find interesting – using static web tech as a system for digital publishing.
  2. First some background. Prior to joining Rumors in Portland, I worked for several years as a software developer at the Getty Museum in Los Angeles.
  3. This was just another day at the office. I highly recommend a visit if you’re ever in LA, the architecture alone is pretty amazing. And admission is free!
  4. The Getty is a world-class art museum, and it also houses a publishing department that produces dozens of art-related books each year. I worked within this department during my time there.
  5. We found a solution based on static site generator technology, or what you’d now call the JAM Stack. We began publishing books this way in 2016 with Ancient Terracottas from South Italy and Sicily. Since then a total of 6 major scholarly publications have been produced this way at the museum, with several more in the pipeline. I’m going to talk mostly about the first “trilogy” here. All of these are available online at www.getty.edu/publications/digital. They are also open source, and the code is available at github.com/gettypubs.
  6. Since this is a tech conference, here’s a quick overview of our tech stack for these projects.
  7. We wanted the products we were creating to feel like books.
  8. The simplicity of building sites on top of static generator tech allowed us to focus on things like creating a great reading experience and responsive design. You can see some examples of that design here. We were inspired by sites like Medium and wanted to deliver an elegant, distraction-free experience to the reader.
  9. Another key feature was making the full text of the books searchable. We used the Lunr.js library for this feature.
  10. Lunr is described by its creator as “a little bit like Solr but much smaller and not as bright”. We still thought it was pretty amazing. No back-end server was required - we generated a JSON index at build time which was consumed by the client at runtime.
  11. Building a JSON index of all text pages in Middleman is pretty straightforward, since you have all of Ruby at your disposal. The software has a “sitemap” object which can be queried and manipulated in various ways. Here we simply looped through the pages and constructed a simple data structure containing text content and basic metadata for each page, which then gets rendered as JSON.
  12. On the client side, the JSON data is fetched and fed into the Lunr search index; fields can be given different weights to prioritize matches found in the title for example.
  13. Leaflet is an open-source mapping library, but it also supports deep-zoom image display.
  14. I wrote a simple ruby script to split up high-resolution images from the museum into tiles at various zoom levels and uploaded them to S3. The catalogue entry pages can then display the images with a zoomable interface similar to Google Maps. We were able to display hundreds of views of dozens of artifacts, at high levels of detail – something that would simply not have been possible in a printed publication. Link out to http://www.getty.edu/publications/terracottas/catalogue/1/ if desired
  15. You can also use Leaflet to display actual maps, of course.
  16. We were able to connect artifacts with the locations where they were found or manufactured.
  17. These catalogues primarily were mainly composed of static HTML pages generated by Middleman. But when more interactivity was required, Vue.js proved to be a useful tool for building complex UI components. It is easy to introduce a Vue component in an otherwise standard web page.
  18. This example comes from the Ancient Lamps catalogue, which contained over 600 entries. Using Vue’s computed properties feature, it was easy to do things like filter and sort a large collection of data in response to multiple criteria instantaneously.
  19. Perhaps the “killer feature” of our web books was the fact that we could also provide EPUB, PDF, and print-on-demand versions of the same material automatically. This is one place where Middleman really shines – out of all the static site generators, it is the easiest one to add custom functionality in. The extension API lets you hook into the build process at various points and inject custom code. I wrote a small extension in Ruby that queried the sitemap during a build to find all the pages where a front matter flag had been set for inclusion in the print version – these pages were fed to the PrinceXML tool which generated a PDF from them.
  20. Here is an example of the kinds of layouts we were able to create using CSS.
  21. The little-known Paged Media module supports pretty sophisticated control over printed layouts (margins, columns, bleeds, breaks, page numbering, etc). Much of this spec is already implemented in major browsers, but the command-line Prince XML software (not open source, unfortunately), offers the best support and was instrumental to generating the print editions.
  22. Compared to traditional books, most websites have a laughably short lifespan. But scholarly work needs to be available for years if not decades so that future researchers can make use of it. The JAM stack is a great way to mitigate this problem. Between the human-readable text files in Git, the static web versions that require no back-end services, and the Epub, PDF, and print versions that we generated at the same time, we are confident that at least some versions of these books will still be usable decades from now.
  23. Another huge advantage of this approach is that the relative simplicity of the tech lowers the barriers to entry for non-specialists.
  24. When your data looks like this, it’s much easier for to collaborate with non-technical staff (editors, designers, etc)
  25. We were able to successfully train editors to use tools like GitHub and text editors. This is an example “revision” of a book after it was published.
  26. One of our editors (Ruth, pictured here) enjoyed the process so much that she wrote about it for the Getty blog.
  27. Finally, our initial work on these publications led to the development of a digital publishing framework, Quire, that is still in active development at the Getty.
  28. Quire builds on top of the Hugo static site generator and uses a CLI written in Node.js to add support for building additional publication formats (PDF, Epub, etc). The project is currently in alpha stages, but several museums and small publishers already have projects in production using this tool. More info at the GitHub repo here.
  29. Before I wrap up, I just want to acknowledge some of the amazing open-source tools that made these projects possible. Finally, I want to leave you all with a challenge, and that is:
  30. Thank you.