mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.65k stars 386 forks source link

Improve Quarto to MyST conversion - Frontmatter #1101

Closed rgaiacs closed 1 year ago

rgaiacs commented 1 year ago

Related to https://github.com/mwouts/jupytext/issues/1102

Consider the follow Quarto file (named mwe.qmd):

---
title: MWE
author: Raniere Silva
---

Foo Bar

jupytext --from qmd --to md:myst mwe.qmd runs without error

[jupytext] Reading mwe.qmd in format qmd
1.4.163
0.2.134
[jupytext] Writing mwe.md in format md:myst

and the MyST file created is

---
jupytext:
  text_representation:
    extension: .md
    format_name: myst
    format_version: 0.13
    jupytext_version: 1.14.7+dev
kernelspec:
  display_name: Python 3 (ipykernel)
  language: python
  name: python3
---

```{raw-cell}

---
title: MWE
author: Raniere Silva
---

Foo Bar


The expected output is

title: MWE author: Raniere Silva jupytext: text_representation: extension: .md format_name: myst format_version: 0.13 jupytext_version: 1.14.7+dev kernelspec: display_name: Python 3 (ipykernel) language: python name: python3

Foo Bar



where the `title` and `author` information is in the YAML header.

Quarto's Frontmatter documentation: https://quarto.org/docs/authoring/front-matter.html

MyST's Frontmatter documentation: https://mystmd.org/guide/frontmatter
mwouts commented 1 year ago

Closing as the issue is with quarto, see #1102