yuvipanda / notebooksharing.space

BSD 3-Clause "New" or "Revised" License
84 stars 10 forks source link

Parse Rmd YAML front matter #36

Open yuvipanda opened 2 years ago

yuvipanda commented 2 years ago

Right now, YAML frontmatter from Rmd files are displayed like this:

image

Not nice. We should probably at least:

  1. parse title and display that
  2. hide the rest

Reported by @RaoOfPhysics

RaoOfPhysics commented 2 years ago

:tada:

Might be nice to also parse author/date/subtitle if available? Not sure if it adds too much or unnecessary complexity to the code.

yuvipanda commented 2 years ago

@RaoOfPhysics do you know if there's a set of 'well known' Rmd keys we can parse and use?

RaoOfPhysics commented 2 years ago

@yuvipanda, maybe just those four and ignore the rest?

See https://zsmith27.github.io/rmarkdown_crash-course/lesson-4-yaml-headers.html

So:

yuvipanda commented 2 years ago

@RaoOfPhysics for now, I've just removed the unformatted view of the frontmatter from the display - check out https://notebooksharing.space/view/468d71e31b3d685154c070b34f3ca88ab1eebf2ff96677ec2dbbc01b1f830897#displayOptions=hide-inputs.

I think figuring out a way to display at least these 4 attributes will be great.

RaoOfPhysics commented 2 years ago

Nice work! Thanks for accepting the feedback! :D