How to craft compelling stories out of audio video interviews
e-book, using [11ty auto navigation book template]](https://github.com/pietrop/11ty-auto-navigation-book-template)
Setup
To contribute
git clone git@github.com:pietrop/how-to-craft-compelling-stories-out-of-audio-video-interviews.git
cd how-to-craft-compelling-stories-out-of-audio-video-interviews
npm install
To use
click on Use this template
. Will prompt you to create a new repo based on this one. And you can then name it, clone it and follow rest of the instructions.
Usage
npm start
System Architecture
Originally forked from adamduncan/eleventy-auto-navigation
Directory structure-based navigation concept for eleventy-plugin-navigation. Based on a moonshoot
🚀 in a discussion about automatic hierarchical navigation.Eleventy Navigation plugin defines its tree structure based on
key
andparent
data in a site's pages.If we want the site tree to mimic the folder structure, we can automate the setting of these properties by leveraging Computed Data, and a little URL path wrangling. See
eleventyComputed.js
data,nav.njk
include andstartsWith
filter for most of the action. (Also check the Eleventylog
for details on the navigation structure.)Under the hood here we're setting the
key
andparent
values to their URL paths, which are inherently unique (whereas setting by page title could become problematic). We also pass theorder
property from the page's frontmatter toeleventyNavigation
. This allows us to override the default sort order (based on date created in collections) should you want to manually re-order siblings (see Mammals child pages, for example).Perhaps not a bullet-proof approach, but certainly gets us most the way there without breaking a sweat.
uses modified version of Simple Tree Menu for the collapsable sidebar navigation.
Development env
- npm >
6.14.13
- Node 14
Node version is set in node version manager .nvmrc
nvm use
Build
npm run build
It generates the _site
folder
Tests
NA
Deployment
npm run build:deploy
or just npm run deploy
if for some reason you don't need to build the site.
This publishes the site to github pages for this github repository.