Static site generator for creating the online version of NBN's quarterly magazine.
git clone https://github.com/northbynorthwestern/mag-rig.git
- Ensure
dist
folder exists in root directory. The directory should contain an emptyindex.html
, global styling inuniversal.css
and two files for video playing on iPhones invidInline/
only. - Populate a google spreadsheet with specific columns explained below. See spreadsheet example.
- Grab shared URL from the spreadsheet for Tabletop.js in
main.js
andfront.js
. Read documentation for more information. - Run
node src/js/main.js
to generate file structure indist
folder - Run
node src/js/front.js
to generate content-rich snippets for each article for the front page (script autopopulates hed, dek, author, media, and url for each article. Formatting of front page display still has to (and should) be done manually).
The following sections must be included to generate the entire magazine correctly:
- section: article's section in mag
- story-slug: 1-3 word hyphenated phrase to describe article for article URL
- hed: article title
- dek: article subhead
- byline: article author
- author-link: link to author's page on northbynorthwestern.com
- top-graphic-type: photo or video. Decides which HTML template will be used.
- media-link: link to main graphic
- media-byline: creator of graphic/photo/video/etc.
- media-author-link: link to author's page on northbynorthwestern.com
- front-preview: first or most relevant sentence or two for the front page article preview
- article-lead: first paragraph of article, not p-tagged
- article body: rest of article, p-tagged
- related-left-hed: related story's title
- related-left-byline: related story's author
- related-left-date: related story's publish date. if from another mag. EX: Fall 2017
- related-right-hed: second related story's title
- related-right-byline: second related story's author
- related-right-date: second related story's publish date. if from another mag. EX: Fall 2017
- Move article templates out of
main.js
/front.js
files and into*.hbs
files intemplates
directory - Add in ArchieML so that
main.js
grabs each story's google document link and populates the story's blackboard with article's contents - automatic media compression? Had contributors upload media to Django, but could store files locally and compress them all for more efficient loading