admin管理员组

文章数量:1304170

Given a _quarto.yml such as:

project:
  type: website

website:
  title: "myTITLE"
  
  navbar:
    logo: "file.png"
    left:
      - href: index.qmd
        text: Home
      - about.qmd
      - license.qmd
      - citation.qmd

I would like to change "license.qmd" by a badge. The following does not work:

project:
  type: website

website:
  title: "An affordable system for the hyperspectral scanning and processing of sediment cores"
  
  navbar:
    logo: "HSILab.png"
    left:
      - href: index.qmd
        text: Home
      - about.qmd
      - [![Attribution-NonCommercial-ShareAlike](.png)](.0/) 
      - citation.qmd

Is there a way to do it?

Given a _quarto.yml such as:

project:
  type: website

website:
  title: "myTITLE"
  
  navbar:
    logo: "file.png"
    left:
      - href: index.qmd
        text: Home
      - about.qmd
      - license.qmd
      - citation.qmd

I would like to change "license.qmd" by a badge. The following does not work:

project:
  type: website

website:
  title: "An affordable system for the hyperspectral scanning and processing of sediment cores"
  
  navbar:
    logo: "HSILab.png"
    left:
      - href: index.qmd
        text: Home
      - about.qmd
      - [![Attribution-NonCommercial-ShareAlike](https://licensebuttons/i/l/by-nc-sa/ffffff/00/00/00/88x31.png)](https://creativecommons./licenses/by-nc-sa/2.0/) 
      - citation.qmd

Is there a way to do it?

Share Improve this question edited Feb 4 at 11:39 Jan 9,4586 gold badges20 silver badges33 bronze badges asked Feb 4 at 8:24 user2955884user2955884 5743 silver badges14 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

You can use the text key like this:

_quarto.yml

project:
  type: website

website:
  title: "Title"
  
  navbar:
    left:
      - href: index.qmd
        text: Home
      - about.qmd
      - href: https://creativecommons./licenses/by-nc-sa/2.0/
        text: "![](https://licensebuttons/i/l/by-nc-sa/ffffff/00/00/00/88x31.png)"
      - citation.qmd

本文标签: quartoHow to include a custom icon in a navbar link by modifying a quartoymlStack Overflow