Skip to content

Commit

Permalink
Add a short stub page for themes
Browse files Browse the repository at this point in the history
Start of #173
  • Loading branch information
askvortsov1 committed Apr 14, 2021
1 parent 57c9f2d commit 369ad66
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/.vuepress/config/locales/en/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = {
'forms',
'permissions',
'settings',
'testing'
'testing',
'theme'
]
},
{
Expand Down
27 changes: 26 additions & 1 deletion docs/extend/theme.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# Quick Start
# Themes

Flarum "themes" are just extensions. Typically, you'll want to use the `Frontend` extender to register custom LESS and JS.
Of course, you can use other extenders too: for example, you might want to support settings to allow configuring your theme.

You can indicate that your extension is a theme by setting the "extra.flarum-extension.category" key to "theme". For example:

```json
{
// other fields
"extra": {
"flarum-extension": {
"category": "theme",
// other fields
}
```

All this will do is show your extension in the "theme" section in the admin dashboard extension list.

## LESS Variable Customization

You can define new LESS variables in your extension's LESS files. There currently isn't an extender to modify LESS variable values in the PHP layer, but this is planned for future releases.

## Switching Between Themes

Flarum doesn't currently have a comprehensive system that would support switching between themes. This is planned for future releases.

0 comments on commit 369ad66

Please sign in to comment.