quarto-dev / quarto-dev/quarto-cli

links to rendered drafts are added to bottom page navigation when `website:draft-mode: unlinked`

Open
#13,964 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug websites
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

I have:
  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide
Bug description

Draft html documents are added to the page navigation when website:draft-mode is set to unlinked.

2nd screenshot below shows hovered link to the linked rendered draft.

Also see repro:

Image Image
Steps to reproduce

Creating a blank blog, then adding to the following configuration to _quarto.yml can reproduce this:

draft-mode: unlinked, page-navigation: true, a sidebar containing blog posts & 1 draft.

e.g.

Run: quarto create project blog ., copy 1 blog post to new directory under posts & set draft: true in yaml, then edit _quarto.yml to the following:

project:
  type: website

website:
  title: "Demo"
  navbar:
    right:
      - about.qmd
      - icon: github
        href: https://github.com/
      - icon: twitter
        href: https://twitter.com
  draft-mode: unlinked
  sidebar:
    contents:
      - section: Blog 
        contents: posts/*/*
  page-navigation: true
format:
  html:
    theme: cosmo
    css: styles.css
Actual behavior

Rendered drafts are linked in the page navigation. Config option website:draft-mode:unlinked should remove them.

Expected behavior

When draft: true for html documents in a website, the rendered draft should not be added to the page navigation.

Your environment
  • OS: MacOS Sonoma 14.6.1
Quarto check output

quarto v1.9.17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with quarto create project blog . using _quarto.yml configured with draft-mode: unlinked, a sidebar containing posts/*/*, and page-navigation: true. Inspect the website page-navigation handling and confirm that an HTML document marked draft: true is not added to the rendered navigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.