Skip to content

Commit 8d923bf

Browse files
committed
replace bookdown.org with Posit Connect Cloud
1 parent d520023 commit 8d923bf

3 files changed

Lines changed: 62 additions & 101 deletions

File tree

inst/examples/03-formats.Rmd

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ In this case, all formats should be at the top level, instead of under an `outpu
4040

4141
## HTML
4242

43-
The main difference between rendering a book (using **bookdown**) with rendering a single R Markdown document (using **rmarkdown**) to HTML\index{HTML} is that a book will generate multiple HTML pages by default---normally one HTML file per chapter. This makes it easier to bookmark a certain chapter or share its URL with others as you read the book, and faster to load a book into the web browser. Currently we have provided a number of different styles for HTML output:
43+
The main difference between rendering a book (using **bookdown**) with rendering a single R Markdown document (using **rmarkdown**) to HTML\index{HTML} is that a book will generate multiple HTML pages by default---normally one HTML file per chapter. This makes it easier to bookmark a certain chapter or share its URL with others as you read the book, and faster to load a book into the web browser. Currently we have provided a number of different styles for HTML output:
4444

45-
- the GitBook style (Section \@ref(gitbook-style)),
46-
- the three-column Bootstrap style (Section \@ref(bs4-book)),
47-
- the default Bootstrap style (Section \@ref(bootstrap-style)), and
45+
- the GitBook style (Section \@ref(gitbook-style)),
46+
- the three-column Bootstrap style (Section \@ref(bs4-book)),
47+
- the default Bootstrap style (Section \@ref(bootstrap-style)), and
4848
- the Tufte style (Section \@ref(tufte-style)).
4949

5050
### GitBook style {#gitbook-style}
@@ -202,7 +202,7 @@ Another button shown on the toolbar is the information ('i') button that lists k
202202
Finally, there are a few more top-level options in the YAML metadata that can be passed to the GitBook HTML template via Pandoc. They may not have clear visible effects on the HTML output, but they may be useful when you deploy the HTML output as a website. These options include:
203203

204204
- `description`: A character string to be written to the `content` attribute of the tag `<meta name="description" content="">` in the HTML head (if missing, the title of the book will be used). This can be useful for search engine optimization (SEO). Note that it should be plain text without any Markdown formatting such as `_italic_` or `**bold**`.
205-
- `url`: The URL of book's website, e.g., `https\://bookdown.org/yihui/bookdown/`.^[The backslash before `:` is due to a technical issue: we want to prevent Pandoc from translating the link to HTML code `<a href="..."></a>`. More details at https://github.com/jgm/pandoc/issues/2139.]
205+
- `url`: The URL of book's website, e.g., `https\://example.github.io/awesome/`.^[The backslash before `:` is due to a technical issue: we want to prevent Pandoc from translating the link to HTML code `<a href="..."></a>`. More details at https://github.com/jgm/pandoc/issues/2139.]
206206
- `github-repo`: The GitHub repository of the book of the form `user/repo`.
207207
- `cover-image`: The path to the cover image of the book.
208208
- `apple-touch-icon`: A path to an icon (e.g., a PNG image). This is for iOS only: when the website is added to the Home screen, the link is represented by this icon.
@@ -216,7 +216,7 @@ Below we show some sample YAML metadata (again, please note that these are _top-
216216
title: "An Awesome Book"
217217
author: "John Smith"
218218
description: "This book introduces the ABC theory, and ..."
219-
url: 'https\://bookdown.org/john/awesome/'
219+
url: 'https\://example.github.io/awesome/'
220220
github-repo: "john/awesome"
221221
cover-image: "images/cover.png"
222222
apple-touch-icon: "touch-icon.png"
@@ -258,7 +258,7 @@ In addition to the basic **bookdown** components (Section \@ref(components)), th
258258
- R syntax highlighting and autolinking by
259259
[the **downlit** package](https://downlit.r-lib.org) is paired with an accessible
260260
color scheme designed by Alison Hill.
261-
261+
262262
- Enhanced metadata for social sharing via platforms like Twitter, LinkedIn, and Facebook, so that each chapter shared will have a unique description, auto-generated based on that chapter's content.
263263

264264
- Ability to configure links to a remote repository like GitHub or GitLab, allowing readers to easily view each chapter's source file or suggest an edit.
@@ -278,11 +278,11 @@ knitr::include_graphics('images/new-bs4-book.png', dpi = NA)
278278

279279
If you do not use RStudio or prefer a function, you can create the same project template with `bookdown::create_bs4_book()` from your R console. See `?bookdown::create_bs4_book` or [the online documentation](https://pkgs.rstudio.com/bookdown/reference/create_book.html) for help.
280280

281-
This style is designed for books that use one chapter per page.
282-
This means that each chapter is an `.Rmd` file, and each `.Rmd` file can contain one chapter.
283-
Each file *must* start with a first-level heading, `# Chapter title`, and that must be the only first-level heading in the file.
281+
This style is designed for books that use one chapter per page.
282+
This means that each chapter is an `.Rmd` file, and each `.Rmd` file can contain one chapter.
283+
Each file *must* start with a first-level heading, `# Chapter title`, and that must be the only first-level heading in the file.
284284

285-
Use second-level and lower-level headings within chapters like:
285+
Use second-level and lower-level headings within chapters like:
286286

287287
```md
288288
# A chapter
@@ -305,7 +305,7 @@ author: "Jane Doe"
305305
date: "`r Sys.Date()`"
306306
site: bookdown::bookdown_site
307307
output: bookdown::bs4_book
308-
url: https://bookdown.org/janedoe/bookdown-demo
308+
url: https://example.github.io/bookdown-demo
309309
cover-image: cover.png
310310
description: |
311311
This is a minimal example of using the bookdown package to write a book.
@@ -322,24 +322,24 @@ You can use the `theme` option to add a `primary` color in [hexadecimal format,]
322322
```yaml
323323
bookdown::bs4_book:
324324
theme:
325-
primary: "#0d6efd"
325+
primary: "#0d6efd"
326326
```
327327
328328
For custom font settings, adding a `google:` keyword triggers [`sass::font_google()`’s](https://rstudio.github.io/sass/reference/font_face.html) ability to automatically import [Google Font files.](https://fonts.google.com) Here is an example YAML that changes the `base_font`, `heading_font`, and `code_font`:
329329

330330
```yaml
331331
bookdown::bs4_book:
332332
theme:
333-
primary: "#0d6efd"
334-
base_font:
333+
primary: "#0d6efd"
334+
base_font:
335335
google: Sen
336336
heading_font:
337337
google:
338338
family: Bitter
339339
wght: 200
340340
code_font:
341-
google:
342-
# arguments to sass::font_google()
341+
google:
342+
# arguments to sass::font_google()
343343
family: DM Mono
344344
local: false
345345
```
@@ -350,7 +350,7 @@ You may also use non-Google fonts that you serve locally using [`sass::font_face
350350

351351
#### Callout blocks
352352

353-
Callout blocks can be used to make certain portions of content stand out from the rest of your narrative. The `bs4_book` style includes special callout blocks with predefined styles for adding a colored border around the text and/or code inside the callout. Use the following syntax to create a callout block:
353+
Callout blocks can be used to make certain portions of content stand out from the rest of your narrative. The `bs4_book` style includes special callout blocks with predefined styles for adding a colored border around the text and/or code inside the callout. Use the following syntax to create a callout block:
354354

355355
````markdown
356356
::: {.rmdnote}
@@ -390,7 +390,7 @@ template](https://github.com/rstudio/bookdown/blob/main/inst/templates/bs4_book.
390390
391391
#### Inline Footnotes {#bs4-book-footnotes}
392392
393-
`bs4_book` makes any footnotes to show inline on hover instead of a linked item at the bottom of the page. You can set `footnotes_inline = FALSE` to opt-out this behavior and keep the footnotes at the bottom.
393+
`bs4_book` makes any footnotes to show inline on hover instead of a linked item at the bottom of the page. You can set `footnotes_inline = FALSE` to opt-out this behavior and keep the footnotes at the bottom.
394394
395395
```yaml
396396
bookdown::bs4_book:
@@ -399,7 +399,7 @@ bookdown::bs4_book:
399399
400400
#### References/Bibliography
401401
402-
Making your citations _footnotes_ allows readers to read them near the text where they are used because `bs4_book` makes by default footnotes appear inline when clicked.
402+
Making your citations _footnotes_ allows readers to read them near the text where they are used because `bs4_book` makes by default footnotes appear inline when clicked.
403403
To do that, download a footnote style CSL file; we recommend <https://www.zotero.org/styles/>.
404404
For example, you could download the `chicago-fullnote-bibliography.csl` from [Zotero,](https://www.zotero.org/styles/?q=id%3Achicago-fullnote-bibliography) then
405405
add this to your `index.Rmd`:
@@ -520,17 +520,17 @@ What the default page builder does is to put TOC in the first row, the body in t
520520
<title>A Nice Book</title>
521521
</head>
522522
<body>
523-
523+
524524
<div class="row">TOC</div>
525-
525+
526526
<div class="row">
527527
CHAPTER BODY
528528
<p>
529529
<button>PREVIOUS</button>
530530
<button>NEXT</button>
531531
</p>
532532
</div>
533-
533+
534534
</body>
535535
</html>
536536
```

0 commit comments

Comments
 (0)