quarto-dev / quarto-dev/quarto-cli
Allow to configure `repo-actions` at directory level
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/11562
Originally posted by mark-andrews November 28, 2024
Description
In a directory level _metadata.yml, we can have a new repo-url key that overrides the website/repo-url that is set in the top level _quarto.yml. See https://github.com/quarto-dev/quarto-cli/issues/4668 and https://github.com/quarto-dev/quarto-cli/commit/3870d39db199d81de65e06e6055b0a49e4309f05 .
However, it seems like I can not do the same thing with repo-actions. In other words, I can not set a repo-actions value in a directory level _metadata.yml that overrides the value set in website/repo-actions in _quarto.yml. For example, if my _quarto.yml has
website:
repo-url: "https://github.com/foobar/barfoo"
repo-actions: [source, edit]
if I have the following in a directory _metadata.yml
website:
repo-url: "https://github.com/foobar/bazfoo"
repo-actions: [source]
then the URL for the GitHub repo on pages in that sub-directory will change from barfoo to bazfoo, but the actions will not have from view source and edit source to just view source.
Ultimately what I would like is to have pages in some subdirectories to have the button to view the source code on GitHub, and pages in some other subdirectories to not have any buttons to link to the source code on GitHub, which I am trying to do by setting repo-actions: none in _metadata.yml in some directories.
Is there a way to to have directory level different values of repo-actions, or is there some other way of turning off these repo actions in all pages in some subdirectories?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how website/repo-actions is read from the top-level _quarto.yml and merged with directory-level _metadata.yml. Check the rendered pages in directories with different repo-url and repo-actions values, including repo-actions: none. Done means directory-level settings control the displayed repository actions without changing unrelated pages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, yaml
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100