diff --git a/README.md b/README.md index dd0e031..3699aa3 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ A prickly blog theme for Hugo # Customization +## Configuration + These are some parameters you can use in your `config.toml` to customize Ficurinia: ```toml @@ -65,6 +67,18 @@ paginate = 5 # number of articles per page in the index accentColor = "#db5793" ``` +## Inject custom content + +Ficurinia supports injecting custom content into the theme. There are several files you can create in `layouts/partials/inject` that will be included inside the theme in different places. + +| Partial | Placement | +|---------|-----------| +| `layouts/partials/inject/body.html` | Before closing the `body` tag | +| `layouts/partials/inject/content-after.html` | After a post or page content | +| `layouts/partials/inject/content-before.html` | Before a post or page content | +| `layouts/partials/inject/footer.html` | At the beginning of the footer | +| `layouts/partials/inject/head.html` | Before closing the `head` tag | + # Does *Ficurinia* mean anything? It's Sicilian for Indian fig, also known as prickly pear cactus. diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 103f322..b99b323 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -10,5 +10,6 @@ {{- partial "footer.html" . -}} {{- partial "plausible.html" . -}} + {{- partial "inject/body.html" . -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a9587f0..96d6315 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,4 +1,5 @@ {{ define "main" }} + {{- partial "inject/content-before.html" . -}}

{{ .Title }}

{{ .Date.Format "2006-01-02" }}

@@ -13,6 +14,7 @@

{{ end }}
+ {{- partial "inject/content-after.html" . -}} {{ if .Site.Params.commento }}