### Bug description

If I use a navbar instead of a sidebar in a book project, social sharing icon URLs are malformed whether I specify one or multiple services. Ref #5629 for a similar bug in sidebar.

To reproduce:

Create a new book project:

```
$ quarto create-project mybook --type book
$ quarto preview mybook
```

Add a `sharing:` tag and a `navbar:` tag to _quarto.yml as follows:

```
project:
  type: book

book:
  title: "mybook"
  author: "Norah Jones"
  date: "5/22/2023"
  sharing: [twitter, linkedin]
  navbar:
    title: "My Book"
  chapters:
    - index.qmd
    - intro.qmd
    - summary.qmd
    - references.qmd

bibliography: references.bib

format:
  html:
    theme: cosmo
  pdf:
    documentclass: scrreprt
```

When the site renders, choosing either sharing icon results in a redirect to an invalid URL; e.g., `https://twitter.com/intent/tweet?url=|url|`

### Checklist

- [ ] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [ ] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [ ] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [ ] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
dragonstyle
2023-05-22T20:16:44Z
blacksqr
bug triaged-to
v1.4
closed
Malformed URL for social sharing icons in book project navbar
https://github.com/quarto-dev/quarto-cli/issues/5630