Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/books/_book-vs-website-key.qmd
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
One important thing to note about using website tools is that while these tools are added to websites within the `website` key, in a book you should include the same options in the `book` key. For example, in a website you would include a favicon and twitter card as follows:
One important thing to note about using website tools is that while these tools are added to websites within the `website` key, in a book you should include the same options in the `book` key. For example, in a website you would include a favicon, twitter card, and analytics as follows:

```yaml
website:
favicon: logo.png
twitter-card: true
site-url: https://example.com
plausible-analytics:
path: _plausible_snippet.html
```

In a book you'd use the `book` key instead:
Expand All @@ -14,5 +16,7 @@ book:
favicon: logo.png
twitter-card: true
site-url: https://example.com
plausible-analytics:
path: _plausible_snippet.html
```

10 changes: 6 additions & 4 deletions docs/websites/website-tools.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: "Website Tools"
---

{{< include ../books/_book-vs-website-key.qmd >}}

As you read the documentation below, keep in mind to substitute `book` for `website` if you are authoring a book.

## Headers & Footers

You can provide standard headers and footers for pages on your site. These can apply to the main document body or to the sidebar. Available options include:
Expand Down Expand Up @@ -64,10 +68,6 @@ You can enhance your website and the content that you publish to it by including
- Twitter Cards
- Open Graph

{{< include ../books/_book-vs-website-key.qmd >}}

As you read the documentation below, keep in mind to substitute `book` for `website` if you are authoring a book.

### Favicon

The favicon for your site provides an icon for browser tabs and other sites that link to yours. Use the `favicon` option to provide the path to a favicon image. For example:
Expand Down Expand Up @@ -213,6 +213,8 @@ image: false

## Analytics

If you are authoring a book, remember to set the analytics keys below under `book` instead of `website` (see the note at the top of this page).

### Plausible Analytics

[Plausible Analytics](https://plausible.io/) is a lightweight, open-source, and privacy-friendly alternative to Google Analytics. Plausible is designed with privacy as a core principle: it doesn't use cookies, is GDPR compliant by default, and all data is processed anonymously.
Expand Down