earthlab / dev-earthlab-site

Development of active learning focused data intensive university classroom materials.
MIT License
0 stars 3 forks source link

Automate md files for authors, libraries, etc #4

Closed lwasser closed 7 years ago

lwasser commented 7 years ago

Currently, the site supports listing multiple authors. Each author can ave a landing page where all of the posts that they authored is listed = yay! The challenge is we can't use plugins which means we can't auto generate pages. Thus we have to create a page for each author.

It would be good to write a makefile that scans all authors and created a .md file for each that we can run occasionally.

lwasser commented 7 years ago

omg - my code is completely hideous

https://github.com/lwasser/NEON-Lesson-Building-Data-Skills/blob/gh-pages/_posts/processing-code/write-yaml-list.Rmd

but this is how i created a yaml list. i'll see how it works on our site with authors. if i remember correctly i got the cod working and then i forgot to save and then i found it later in the rhistory files. but my goodness ugly code weirdness.

lwasser commented 7 years ago

Ok - i've created a cleaner version but it needs to be functionalized rather than a big loop.

https://github.com/earthlab/dev-earthlab-site/blob/master/processing-code/write-yaml.Rmd

Next - how do i write a .md file with the following content

https://raw.githubusercontent.com/earthlab/dev-earthlab-site/master/org/authors/max-joseph.md

---
layout: post-by-author
author: Matt Oakley
permalink: /authors/matt-oakley/
title: 'Matt Oakley'
author_profile: false
site-map: true
---

the name of each file should be matt.oakley.md

mbjoseph commented 7 years ago

Good to close this one?

lwasser commented 7 years ago

yup!! i'll close it now :) thanks!