Skip to content

quarto preview sometimes gets stuck on a reload loop #10382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cscheid opened this issue Jul 26, 2024 · 10 comments
Open

quarto preview sometimes gets stuck on a reload loop #10382

cscheid opened this issue Jul 26, 2024 · 10 comments
Assignees
Labels
bug Something isn't working preview issues related to the `preview` command
Milestone

Comments

@cscheid
Copy link
Collaborator

cscheid commented Jul 26, 2024

In the following instance, the culprit appears to be a ref: . entry in the navbar spec.

hfrick/workshops@5243cda

@cscheid cscheid added bug Something isn't working preview issues related to the `preview` command labels Jul 26, 2024
@cscheid cscheid added this to the v1.6 milestone Jul 26, 2024
@cscheid cscheid self-assigned this Jul 26, 2024
@cderv
Copy link
Collaborator

cderv commented Jul 26, 2024

Just curious :

          - text: English
            href: .

What does this means exactly ? I would think href link for root of the website, but in that case wouldn't it be

          - text: English
            href: /

I did not look closely into the code base, but href is usually a document or external link. To add a link to root of the website, I would use /. Probably equivalent and . should work, but maybe catching . and replacing by / could be a safery measure here... 🤔

Anyhow, just wanted to share this thoughts of href: /

@mcanouil
Copy link
Collaborator

Indeed, the href: / "trick" solved the issue (see discussion on Slack).

My guess is that href: . might be resolved on each pages as it means "relative".

@cscheid
Copy link
Collaborator Author

cscheid commented Jul 26, 2024

Be that as it may, I think there should be nothing in Quarto that causes quarto preview to be stuck in a reload loop.

@max-de-rooij
Copy link

In my project, quarto preview remains in a reload loop because it's constantly creating and deleting a folder with a file called clipboard.min.js. Globally setting watch-inputs: false does not change anything.

@mcanouil
Copy link
Collaborator

@max-de-rooij please do provide a reproducible example. We unfortunately can't use your statement to investigate.

@max-de-rooij
Copy link

@mcanouil Sorry, I've done some investigation and apparently creating a button with a link as / causes quarto to reload indefinitely:

[Click Me](/){.btn .btn-success}

@mcanouil
Copy link
Collaborator

I can't reproduce.

quarto preview index.qmd
---
title: "Quarto Playground"
format: html
---

This is a playground for Quarto.

{{< lipsum 1 >}}

![An image]({{< placeholder 600 400 >}}){#fig-placeholder}

[Click Me](/){.btn .btn-success}

@max-de-rooij
Copy link

This is the yml file:

project:
  type: website

website:
  title: "example"
  navbar:
    background: "#C81919"
    align: center
    title: false
    left:
      - href: index.qmd

format:
  html:
    theme: cosmo
    toc: true

@max-de-rooij
Copy link

Screen.Recording.2024-08-12.at.15.55.06.mov

@mcanouil
Copy link
Collaborator

mcanouil commented Aug 19, 2024

@max-de-rooij I still can't reproduce on the development version at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preview issues related to the `preview` command
Projects
None yet
Development

No branches or pull requests

4 participants