Skip to content

Commit 1038a82

Browse files
authored
Fontawesome config (#496)
1 parent ba55f3f commit 1038a82

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

docs/config.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ Here's a quick overview of what everything means with an example file:
3535
'queue' =>
3636
array (
3737
'driver' => 'sync', // Use the standard sync queue. Omitting this will entirely will have the same effect
38+
),
39+
'fontawesome' =>
40+
array (
41+
'source' => 'local', // Use the bundled FontAwesome Free v6 icons. See below for other config options
3842
)
3943
);
4044
```
@@ -77,3 +81,33 @@ Flarum has a maintenance mode that can be enabled by setting the `offline` key i
7781
This can also be configured from the admin panel's advanced settings page:
7882

7983
![Toggle advanced page](https://user-images.githubusercontent.com/20267363/277113270-f2e9c91d-2a29-436b-827f-5c4d20e2ed54.png)
84+
85+
### FontAwesome
86+
87+
By default Flarum uses the bundled FontAwesome 'Free' v6 icons. These can be switched out to use either a CDN hosted icon bundle, or a custom kit.
88+
89+
```php
90+
<?php
91+
92+
return [
93+
'url' => 'https://example.com',
94+
// ... other config
95+
96+
// FontAwesome Kit (Pro features + custom icons)
97+
'fontawesome' => [
98+
'source' => 'kit',
99+
'kit_url' => 'https://kit.fontawesome.com/YOUR_KIT_CODE.js',
100+
],
101+
102+
// OR use a CDN
103+
// 'fontawesome' => [
104+
// 'source' => 'cdn',
105+
// 'cdn_url' => 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css',
106+
// ],
107+
108+
// OR keep local (default, no config needed)
109+
// 'fontawesome' => [
110+
// 'source' => 'local',
111+
// ],
112+
];
113+
```

docs/themes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ The [admin dashboard](admin.md)'s Appearance page is a great first place to star
1212
- Add HTML for custom headers and footers
1313
- Add [custom LESS/CSS](#css-theming) to change how elements are displayed
1414

15+
## FontAwesome
16+
17+
Flarum allows customization out-of-the-box to the FontAwesome icon sets used. By default we use FontAwesome 6 free icons, but this can be easily modified to use the `Pro` or even full Kits via the [advanced settings](admin.md) for configuration via the UI, or via [config.php](config.md) for code-based setups.
18+
1519
## CSS Theming
1620

1721
CSS is a style sheet language that tells browsers how to display elements of a webpage.

0 commit comments

Comments
 (0)