mirror of https://github.com/lxndrblz/anatole.git

Alexander Bilz
05.38.2020 e860fc9bfa717a34faaca161707e003f5e88cfc9
Added option for custom CSS
3 files modified
23 ■■■■ changed files
README.md 19 ●●●● patch | view | raw | blame | history
exampleSite/config.toml 1 ●●●● patch | view | raw | blame | history
layouts/partials/head.html 3 ●●●●● patch | view | raw | blame | history
README.md
@@ -15,6 +15,7 @@
* Katex support
* MIT License
* Fontawesome icons
* Custom CSS
## Preview the exampleSite
```
@@ -38,7 +39,7 @@
Ìn this section I'll discuss the custom parameters available within the `config.toml`. The complete [sample](https://github.com/lxndrblz/anatole/blob/master/exampleSite/config.toml) can be found in the exampleSite folder. 
### Profile picture and slogan
```
```toml
[params]
title = "I'm Jane Doe"
author = "Jane Doe"
@@ -47,7 +48,7 @@
```
### Navigation items
Non-content entries can be added right from the `config.toml` file.
```
```toml
[menu]
  [[menu.main]]
@@ -70,22 +71,30 @@
```
### Comments powered by Disqus
No comment section is shown on the `single.html`, unless a disqus code is specified in the `config.toml` file.
```
```toml
disqusShortname = "XXX"
```
### Google Analytics
To use Google Analytics, a valid tracking code has to be added. If you don't want to load the code, then commend out the parameter.
```
```toml
googleAnalytics = "UA-123-45"
```
### Beautiful math functions
```
```toml
## Math settings
[params.math]
enable = false  # options: true, false. Enable math support globally, default: false. You can always enable math on per page.
use = "katex"  # options: "katex", "mathjax". default is "katex".
```
### Custom CSS
You can add your custom CSS files with the `customCss` parameter of the configuration file. Put your files into the `static/css` directory.
```toml
customCss = ["css/custom1.css", "css/custom2.css"]
```
## License
Anatole is licensed under the [MIT license](https://github.com/lxndrblz/anatole/blob/master/LICENSE).
exampleSite/config.toml
@@ -19,6 +19,7 @@
profilePicture = "images/profile.jpg"
keywords = ""
favicon = "favicons/"
customCss = []
## Math settings
[params.math]
layouts/partials/head.html
@@ -5,6 +5,9 @@
    <meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
    <meta name="description" content="{{ .Site.Params.description }}">
    <link rel="stylesheet" href="{{ `css/style.css` | absURL }}" type="text/css">
    {{ range .Site.Params.customCss -}}
    <link rel="stylesheet" href="{{ . | absURL }}" type="text/css">
    {{- end }}
    <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
    <base href="{{ .Site.BaseURL }}">
    <!-- Favicons -->