Skip to content

Commit

Permalink
fix: 🐛 only remove qmd files in reference post render to fix md forma…
Browse files Browse the repository at this point in the history
…tting issues (#1107)

## Description

Removing the entire `reference/` folder post-render is problematic
because the `_sidebar.yml` file in this folder is referenced under
`metadata-files` in `_quarto.yml`. When this file is removed
post-render, it seems to disrupt Quarto's functionality in VS Code,
affecting its visual mode. As a result, formatting (including column
wrapping at length 72) doesn't work as expected.

Changing the post-render process to remove only `qmd` files resolves
this issue, since (as far as I understand) preserving `_sidebar.yml`
ensures that `_quarto.yml` remains valid and maintains an uninterrupted
visual mode.

Please check if this works for you locally by: 

1. Go to this branch 
2. Run `just build-website` (to get the `_sidebar.yml` back) 
3. In an `md` or a `qmd` file, go to visual mode, save it, and go back
to source mode.

Is the formatting still OK after these steps for you as well? 🤞 

Closes #1089 

<!-- Select quick/in-depth as necessary —>
This PR needs an in-depth review.

## Checklist

- [X] Ran `just run-all`
  • Loading branch information
signekb authored Mar 5, 2025
1 parent a1736e1 commit 52092ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project:
type: seedcase-theme
pre-render: rm -rf .storage
post-render: rm -rf docs/reference
post-render: rm -rf docs/reference/*.qmd
render:
- "docs/*"
- "index.qmd"
Expand Down

0 comments on commit 52092ac

Please sign in to comment.