Skip to content

Commit 8571d70

Browse files
committed
Update the documentation for Font Awesome
This updates the documentation to try to improve the Font Awesome support.
1 parent 4b5ea14 commit 8571d70

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The following is a summary of the changes that may require your attention when u
7575

7676
- Updated to a newer version of `pulldown-cmark`. This brings a large number of fixes to markdown processing.
7777
[#2401](https://github.com/rust-lang/mdBook/pull/2401)
78-
- The font-awesome font is no longer loaded as a font. Instead, the corresponding SVG is embedded in the output for the corresponding `<i>` tags. Additionally, a handlebars helper has been added for the `hbs` files.
78+
- The font-awesome font is no longer loaded as a font. Instead, the corresponding SVG is embedded in the output for the corresponding `<i>` tags. Additionally, a handlebars helper has been added for the `hbs` files. This also updates the version from 4.7.0 to 6.2.0, which means some of the icon names and styles have changed. Most of the free icons are in the "solid" set. See the [free icon set](https://fontawesome.com/v6/search) for the available icons.
7979
[#1330](https://github.com/rust-lang/mdBook/pull/1330)
8080
- Changed all internal HTML IDs to have an `mdbook-` prefix. This helps avoid namespace conflicts with header IDs.
8181
[#2808](https://github.com/rust-lang/mdBook/pull/2808)

guide/src/format/configuration/renderers.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ The following configuration options are available:
143143
those labels. Defaults to `false`.
144144
- **git-repository-url:** A url to the git repository for the book. If provided
145145
an icon link will be output in the menu bar of the book.
146-
- **git-repository-icon:** The FontAwesome icon class to use for the git
147-
repository link. Defaults to `fab-github` which looks like <i class="fa fab-github"></i>.
148-
If you are not using GitHub, another option to consider is `fa-code-fork` which looks like <i class="fas fa-code-fork"></i>.
146+
- **git-repository-icon:** The Font Awesome icon class to use for the git repository link. Defaults to `fab-github` which looks like <i class="fab fa-github"></i>. If you are not using GitHub, another option to consider is `fas-code-fork` which looks like <i class="fas fa-code-fork"></i>. The start of the string should be `fa-` for regular icons, `fas-` for solid icons, or `fab-` for brand icons. See the [free icon set](https://fontawesome.com/v6/search) for the available icons.
149147
- **edit-url-template:** Edit url template, when provided shows a
150148
"Suggest an edit" button (which looks like <i class="fas fa-pencil"></i>) for directly jumping to editing the currently
151149
viewed page. For e.g. GitHub projects set this to

guide/src/format/mdbook.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,17 @@ HTML tags with class `hidden` will not be shown.
340340

341341
## Font-Awesome icons
342342

343-
mdBook includes a copy of [Font Awesome Free's](https://fontawesome.com)
343+
mdBook includes a copy of version 6 of [Font Awesome Free's](https://fontawesome.com)
344344
MIT-licensed SVG files. It emulates the `<i>` syntax, but converts the results
345345
to inline SVG. Only the regular, solid, and brands icons are included; paid
346346
features like the light icons are not.
347347

348348
For example, given this HTML syntax:
349349

350350
```hbs
351-
The result looks like this: <i class="fas fa-print"></i>
351+
The result looks like this: <i class="fa-solid fa-print"></i>
352352
```
353353

354-
The result looks like this: <i class="fas fa-print"></i>
354+
The result looks like this: <i class="fa-solid fa-print"></i>
355+
356+
See the [free icon set](https://fontawesome.com/v6/search) for the available icons.

guide/src/format/theme/index-hbs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ MIT-licensed SVG files. It accepts three positional arguments:
9595
1. Type: one of "solid", "regular", and "brands" (light and duotone are not
9696
currently supported)
9797
2. Icon: anything chosen from the
98-
[free icon set](https://fontawesome.com/icons?d=gallery&m=free)
98+
[free icon set](https://fontawesome.com/v6/search)
9999
3. ID (optional): if included, an HTML ID attribute will be added to the
100100
icon's wrapping `<span>` tag
101101

0 commit comments

Comments
 (0)