mirror of
https://github.com/rust-lang/mdBook.git
synced 2025-12-27 10:16:09 -05:00
Update the documentation for Font Awesome
This updates the documentation to try to improve the Font Awesome support.
This commit is contained in:
@@ -75,7 +75,7 @@ The following is a summary of the changes that may require your attention when u
|
||||
|
||||
- Updated to a newer version of `pulldown-cmark`. This brings a large number of fixes to markdown processing.
|
||||
[#2401](https://github.com/rust-lang/mdBook/pull/2401)
|
||||
- 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.
|
||||
- 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.
|
||||
[#1330](https://github.com/rust-lang/mdBook/pull/1330)
|
||||
- Changed all internal HTML IDs to have an `mdbook-` prefix. This helps avoid namespace conflicts with header IDs.
|
||||
[#2808](https://github.com/rust-lang/mdBook/pull/2808)
|
||||
|
||||
@@ -143,9 +143,7 @@ The following configuration options are available:
|
||||
those labels. Defaults to `false`.
|
||||
- **git-repository-url:** A url to the git repository for the book. If provided
|
||||
an icon link will be output in the menu bar of the book.
|
||||
- **git-repository-icon:** The FontAwesome icon class to use for the git
|
||||
repository link. Defaults to `fab-github` which looks like <i class="fa fab-github"></i>.
|
||||
If you are not using GitHub, another option to consider is `fa-code-fork` which looks like <i class="fas fa-code-fork"></i>.
|
||||
- **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.
|
||||
- **edit-url-template:** Edit url template, when provided shows a
|
||||
"Suggest an edit" button (which looks like <i class="fas fa-pencil"></i>) for directly jumping to editing the currently
|
||||
viewed page. For e.g. GitHub projects set this to
|
||||
|
||||
@@ -340,7 +340,7 @@ HTML tags with class `hidden` will not be shown.
|
||||
|
||||
## Font-Awesome icons
|
||||
|
||||
mdBook includes a copy of [Font Awesome Free's](https://fontawesome.com)
|
||||
mdBook includes a copy of version 6 of [Font Awesome Free's](https://fontawesome.com)
|
||||
MIT-licensed SVG files. It emulates the `<i>` syntax, but converts the results
|
||||
to inline SVG. Only the regular, solid, and brands icons are included; paid
|
||||
features like the light icons are not.
|
||||
@@ -348,7 +348,9 @@ features like the light icons are not.
|
||||
For example, given this HTML syntax:
|
||||
|
||||
```hbs
|
||||
The result looks like this: <i class="fas fa-print"></i>
|
||||
The result looks like this: <i class="fa-solid fa-print"></i>
|
||||
```
|
||||
|
||||
The result looks like this: <i class="fas fa-print"></i>
|
||||
The result looks like this: <i class="fa-solid fa-print"></i>
|
||||
|
||||
See the [free icon set](https://fontawesome.com/v6/search) for the available icons.
|
||||
|
||||
@@ -95,7 +95,7 @@ MIT-licensed SVG files. It accepts three positional arguments:
|
||||
1. Type: one of "solid", "regular", and "brands" (light and duotone are not
|
||||
currently supported)
|
||||
2. Icon: anything chosen from the
|
||||
[free icon set](https://fontawesome.com/icons?d=gallery&m=free)
|
||||
[free icon set](https://fontawesome.com/v6/search)
|
||||
3. ID (optional): if included, an HTML ID attribute will be added to the
|
||||
icon's wrapping `<span>` tag
|
||||
|
||||
|
||||
Reference in New Issue
Block a user