Openscapes / website-new

Openscapes.org website, made with Quarto and GitHub, published with Netlify
https://openscapes.org
7 stars 2 forks source link

porting blog posts #6

Closed samanthacsik closed 1 year ago

samanthacsik commented 1 year ago

I have no idea exactly how to automate porting blog posts from the blogdown site to the new quarto framework, but here's where things currently live/look like in the blogdown framework & how they need to be set up in the quarto framework:

Comparing frameworks

Blogdown

Quarto

---
title: "This is a blog post title"
author: Sam Csik, Julie Lowdnes
date: 2023-03-21
categories: 
  - cat1
  - cat2
  - cat3
image: my_img.png
---

Brainstorming how to do this:

I think a bash script may be the way to go? (TODOs are not necessarily listed in order)

For each .md file, create a folder inside blog/ -- this requires:

  1. the date of publication (parse this from the yaml?)
  2. a short name (the current .md file name?)
  3. combining the date & short name to create a folder name

Create an index.qmd file inside the folder

Create yaml for reach index.qmd file -- most yaml options will remain the same, though the following need to be updated/changed:

Copy over body of blog

Pull images from static/img/blog and add to folder with corresponding blog post

jules32 commented 1 year ago

Great news - note from Carlos Scheidegger:

I don't think you're far off from what will be required, but I want to note at least one thing: the image field supports "project" paths. If you write (for example) image: /static/img/blog/2022-afsc-zoom-square.png, then quarto should be able to find that image, assuming that there exists a static/img/blog folder at the project top-level

New posts can use the relative path syntax if you'd prefer, but this would simplify porting the existing old posts, since "all" you have to do is read the YAML, and replace banner: X with image: /X (if that makes sense)

samanthacsik commented 1 year ago

Linked this issue for reference in the Adding blog posts wiki and closing it here to clean up issues

jules32 commented 1 year ago

This is so huge, congrats Sam! 🎉