2 title = "Customising Visuals"
3 description = "Changing the colors, logo and styles of BookStack to suit your needs"
8 You may find you want to customise BookStack to use custom branding or you may just not like the default blue theme. Customising the branding of BookStack is super simple and can be done through the settings interface under 'App Settings'. Here you can change the application name, logo and the core colours used.
9 Changing the app name will simply update the name displayed in the header and browser tab.
10 Changing the logo updates the logo shown in the header. This can be removed if you only want to display the chosen name.
11 Changing the app color will update the color of the header, links and the majority of buttons within the system.
15 To change fonts you can make use of the 'Custom HTML head content' setting to add some CSS to alter fonts used.
16 Copy the code below and alter the font names to your desired fonts. Then paste this into the 'Custom HTML head content' box
17 in the admin settings of BookStack.
21 body, button, input, select, label, textarea {
22 font-family: "Roboto", sans-serif;
24 .Codemirror, pre, #markdown-editor-input, .editor-toolbar, .code-base {
25 font-family: monospace;
30 Here's an example of using the 'Lato' font from [Google Web Fonts](https://fonts.google.com):
33 <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
35 body, button, input, select, label, textarea {
36 font-family: 'Lato', sans-serif;
38 .Codemirror, pre, #markdown-editor-input, .editor-toolbar, .code-base {
39 font-family: monospace;
44 Note that this won't change anything in the settings screen for stability purposes.
46 ### Changing Code Block Themes
48 When inserting code into a page or when using the Markdown editor, the text you enter is highlighted by a default codemirror colour scheme.
49 If you'd prefer a different colour scheme for code blocks this can be overridden. BookStack uses CodeMirror to render code blocks. You can [try out different themes here](https://codemirror.net/demo/theme.html#base16-light). Once you've chosen a theme note down the name.
51 In BookStack settings, Find the 'Custom HTML head content' setting and add the following code:
54 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.29.0/theme/cobalt.min.css"/>
55 <script>window.codeTheme='cobalt';</script>
58 In the above example we are setting the theme to `cobalt`. Change `cobalt` to the name of your desired theme on both of the above lines.
59 The first lines adds the required theme styles, Fetched from [cdnjs](https://cdnjs.com/) whom generously host all CodeMirror files.
60 The second line then sets the theme name which will be picked up when code blocks are rendered.
64 By default the `/books` page displays your books as a list. Users can change this option to list or grid view but if you'd like to set the default for public viewers or new users you can add the following to your `.env` file:
67 # Show grid view by default
70 # Show list view by default
74 ### Further Customisation
76 If you need to customise BookStack further to the given controls in the settings area you can make use of the 'Custom HTML head content' setting. Using this you can add in any custom JavaScript or CSS content to override default BookStack functionality and styles.
78 [View the Hacking BookStack](/docs/admin/hacking-bookstack/) page for more advanced ways to achieve deeper customisation.