Skip to content
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

Option for adding noindex tag in preview? #96

Open
maelle opened this issue Jan 8, 2024 · 5 comments
Open

Option for adding noindex tag in preview? #96

maelle opened this issue Jan 8, 2024 · 5 comments

Comments

@maelle
Copy link

maelle commented Jan 8, 2024

I wonder whether the render and publish actions could have a parameter for adding a noindex,nofollow meta tag in the website head (that one could activate for preview workflows). Sorry if I missed something equivalent.

@cderv
Copy link
Collaborator

cderv commented Jan 8, 2024

Do you do that already locally using some quarto configuration ?

Just wondering if you have a current way to do that and you would like it to be automated ...

I am thinking your project profile you can be able to add this in your website. And then this is just a matter of using the action with the right profile.

@maelle
Copy link
Author

maelle commented Jan 8, 2024

I don't do that at all yet, I was exploring how I can do it.

I was thinking about includes https://quarto.org/docs/reference/formats/pdf.html#includes but I don't think any of them adds something to the head. 🤔

@cderv
Copy link
Collaborator

cderv commented Jan 8, 2024

this is doc for PDF. So probably not what you were looking.

You want in the <head> of Quarto website ?

include-in-header for format: html does not work ?

@maelle
Copy link
Author

maelle commented Jan 15, 2024

@cderv Thank you! What works:

format:
  html:
    include-in-header:
      - text: |
          <meta name="robots" content="noindex">

I was confused by the option name, because I think of head and header as two different things.

I used this solution, with project profiles, in cynkra/cynkrablog#41

I still wonder whether it could be more "built-in" as an option of the action, since it might be a rather common need?

@cderv
Copy link
Collaborator

cderv commented Jan 15, 2024

I was confused by the option name, because I think of head and header as two different things.

Name is based on Pandoc flag --include-in-header, and close to header-includes in R Markdown ecosystem.

So basically, this insert above the the body part, which in HTML means in <head>.

I used this solution, with project profiles

Looks good !

I still wonder whether it could be more "built-in" as an option of the action, since it might be a rather common need?

So it would mean for example

  • Adding an option in the action like preview: true
  • This would for now add the meta in head

🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants