2021-04-19 02:57:44 -05:00
![logo ](static/logo.svg )
2020-08-24 02:05:09 -05:00
# Ficurinia
A prickly blog theme for Hugo
2021-01-03 07:18:07 -06:00
![](images/tn.png)
2020-08-24 02:05:09 -05:00
# [Demo](https://gabmus.org)
[Code for the demo website ](https://gitlab.com/gabmus/gabmus.gitlab.io ) (really my personal website)
2021-04-16 11:21:39 -05:00
[Screenshot gallery ](https://gabmus.gitlab.io/hugo-ficurinia-screenshots/ ) showcasing 256 of the possible configurations that Ficurinia offers.
2020-08-24 02:05:09 -05:00
# Customization
2021-01-02 07:08:21 -06:00
## Configuration
2020-08-24 02:05:09 -05:00
These are some parameters you can use in your `config.toml` to customize Ficurinia:
```toml
2021-04-14 15:53:14 -05:00
baseURL = "https://example.com/"
2020-08-24 02:05:09 -05:00
theme = "hugo-ficurinia"
title = "My nice blog"
2021-04-14 15:53:14 -05:00
# this will be included in the footer after the current year the site is last
# built, followed by the (c) symbol
# you can use markdown inside this field
copyright = "Some copyright notice - [my license ](https://example.com/license )"
2020-08-24 02:05:09 -05:00
paginate = 5 # number of articles per page in the index
2021-04-12 17:07:33 -05:00
summaryLength = 70 # number of words for article summaries
2020-08-24 02:05:09 -05:00
[params]
2021-03-10 01:41:49 -06:00
author = "Gabriele Musco"
2021-04-18 03:50:02 -05:00
description = "A description for my website" # this will be added as metadata
2021-06-12 08:07:39 -05:00
posts = "posts" # content directory where to find home page posts; default searches in "posts" and "post"
2021-07-06 12:29:08 -05:00
showPostsLink = true # show or hide the link to the simple post list
2021-06-12 08:07:39 -05:00
extraContentDirs = [] # other content directories to render similarly to the home page
2021-07-06 13:19:13 -05:00
showcaseDir = "showcase" # create a content directory that shows a special showcase section in the home page
2021-06-12 08:07:39 -05:00
2021-04-19 02:57:44 -05:00
# It's best to put these icons in the "static" folder of your site
logo = "/logo.svg"
2021-06-09 15:41:59 -05:00
favicon = "/favicon.png" # 32x32
faviconIco = "/favicon.ico" # 32x32
appletouch = "/apple-touch-icon.png" # 180x180
2021-04-19 02:57:44 -05:00
svgicon = "/logo.svg"
2020-08-24 02:05:09 -05:00
showTags = true # show the Tags menu item; default true
showRss = true # show the link for the RSS feed; default true
2021-04-14 04:19:13 -05:00
2021-03-10 02:25:37 -06:00
imageInArticlePreview = false # show images in article preview; default false
2021-06-12 08:11:59 -05:00
fitImageInArticlePreview = false # make article preview images fit the article preview instead of getting cropped
2021-06-09 13:54:12 -05:00
articleSummary = true # show a summary in article preview; default true
2020-08-24 02:05:09 -05:00
2021-04-14 05:26:19 -05:00
navtype = "standard" # changes the style of the pagination, available styles are: "standard", "circles"
2021-12-13 03:55:11 -06:00
2021-01-04 06:27:07 -06:00
fontFamily = "JetBrains Mono" # changes the font, default "JetBrains Mono"
2021-06-09 15:35:33 -05:00
titleFontFamily = "JetBrains Mono" # font used for titles and headings
2021-04-12 17:12:57 -05:00
monospaceFontFamily = "JetBrains Mono" # changes the monospace font for code, default "JetBrains Mono"
2021-12-13 03:55:11 -06:00
# multipliers applied to font sizes, useful for custom fonts that may be too big or too small
titleFontSizeMultiplier = 1.0
mainFontSizeMultiplier = 1.0
monoFontSizeMultiplier = 1.0
2021-04-12 16:49:04 -05:00
contentWidth = "1000px" # maximum width of the site content, css syntax
2021-01-04 06:20:55 -06:00
2021-01-05 02:38:10 -06:00
discreteCards = false # enable discrete card style; default false
2021-04-19 04:14:05 -05:00
discreteTags = false # enable discrete tag style; default false
2021-04-19 04:42:35 -05:00
tagsInArticlePreview = true # enable tags list in the article preview card
2021-04-12 16:49:04 -05:00
gridView = false # show post list as a grid. goes well with discreteCards
2021-04-14 04:33:15 -05:00
highlightBgColor = "#34363b" # card and circle navigation background color for discrete card mode
2021-04-19 05:01:09 -05:00
bigArticleTitle = false # makes the title in the single article view bigger
2021-01-05 02:38:10 -06:00
2021-04-13 08:21:40 -05:00
enableSearch = true # enable search page
2021-04-13 09:04:16 -05:00
searchbarEverywhere = true # if the searchbar should be shown in every page; requires enableSearch
searchMenuLink = false # add a search link to the navigation menu; requires enableSearch
2021-04-18 06:04:19 -05:00
mobileHamburgerNav = false # alternative hamburger menu layout for the main nav menu when screen is small
2021-04-13 08:21:40 -05:00
2021-04-13 16:30:34 -05:00
enableFeatured = false # enable a particular view for articles marked as featured (featured: true in the article frontmatter)
2021-12-13 04:09:21 -06:00
underlineTitleLinks = false # show an underline also for links that are titles
2020-08-24 12:27:09 -05:00
# enable comments support with commento using the script from your server
commento = "https://example.com/js/commento.js"
2021-06-16 02:56:00 -05:00
# enable comments support with cactus comments (cactus.chat)
cactusCommentsSiteName = "example.com"
2021-06-16 02:58:16 -05:00
cactusCommentsServerName = "cactus.chat"
2021-06-16 02:56:00 -05:00
cactusCommentsHomeserver = "https://matrix.cactus.chat:8448"
2020-10-16 13:02:18 -05:00
# enable analytics using Plausible
plausibleScriptUrl = "https://something.com/..."
2021-04-14 15:53:14 -05:00
plausibleDomain = "example.com"
2020-10-16 13:02:18 -05:00
2021-06-28 03:20:05 -05:00
enableShareOnFediverse = false # enable a button at the end of an article to share it on the fediverse
2021-04-14 04:19:13 -05:00
# WARNING: deprecated! Use [[menu.icons]] instead, look below
# links = [
# ["GitLab", "https://gitlab.com/gabmus"],
# ["GNOME", "https://gitlab.gnome.org/gabmus"],
2021-04-14 04:27:24 -05:00
# ["YouTube", "https://youtube.com/TechPillsNet"]
2021-04-14 04:19:13 -05:00
# ]
2020-08-24 02:05:09 -05:00
# you can customize all of the colors in this theme
# the values shown are the defaults
backgroundColor = "#242629"
foregroundColor = "white"
dimForegroundColor = "#bababa"
strokeColor = "#4f4f4f"
accentColor = "#db5793"
2021-01-19 03:08:51 -06:00
2021-12-16 05:37:20 -06:00
# alternative sidebar layout
enableSidebarLayout = false
sidebarBackgroundColor = "#34363b"
sidebarForegroundColor = "white"
2021-01-19 03:08:51 -06:00
# redirect to baseURL if current URL host doesn't match
# useful if deploying in gitlab pages with custom domain and don't want
# the username.gitlab.io/website url to persist
2021-04-14 15:53:14 -05:00
# this requires you to set baseURL (see above)
2021-01-19 03:08:51 -06:00
forceRedirect = false
2021-04-13 03:19:17 -05:00
infiniteScrolling = false # activates infinite scrolling instead of regular pagination
2021-04-14 16:53:36 -05:00
enableFooterColumns = false # activates footer columns, as described below
2021-05-04 08:21:14 -05:00
enableJumbotron = false # enables jumbotron, as described below
2021-04-15 00:46:53 -05:00
# related articles will be selected randomly based on tags and shown at
# the bottom of the article, after the comments
enableRelatedArticles = false
relatedArticlesNum = 2 # how many related articles to show
2021-04-15 03:14:05 -05:00
randomRelated = false # sorts related articles in random order (randomized at built time)
2021-04-13 03:19:17 -05:00
2021-04-14 04:19:13 -05:00
[menu]
# these links will be added to the main navigation menu, sorted by weight
# other elements in this menu are added automatically from the "pages" folder
# the folder it will look into can be customized with the pages variable
# in params above
[[menu.main]]
identifier = "about"
name = "About"
url = "/about/"
weight = 10
# these links (menu.icons) will be added as icon links below the main nav
[[menu.icons]]
identifier = "gitlab"
name = "GitLab"
url = "https://gitlab.com/gabmus"
weight = 10
[[menu.icons]]
identifier = "gnome"
name = "GNOME GitLab"
url = "https://gitlab.gnome.org/gabmus"
weight = 20
2021-04-13 03:19:17 -05:00
# this section is necessary if you want infinite scrolling
# it allows to output the article list as paged JSON so that "pages" can be retrieved via javascript
[outputs]
home = ["HTML", "JSON"]
2020-08-24 02:05:09 -05:00
```
2021-04-14 04:27:24 -05:00
### Supported icons
For the `[[menu.icons]]` menu. They match identifier, name and url can be whatever. Here's a list of supported identifiers:
- email
- facebook
- github
2021-04-15 07:22:37 -05:00
- gitlab
- gnome
- instagram
2021-04-14 04:27:24 -05:00
- linkedin
- mastodon
2021-04-15 07:22:37 -05:00
- matrix
- peertube
2021-04-14 04:27:24 -05:00
- phone
2021-04-15 07:22:37 -05:00
- pleroma
2021-04-14 04:27:24 -05:00
- rss
2021-04-15 07:22:37 -05:00
- steam
- telegram
- twitter
- xmpp
- youtube
2021-04-14 04:27:24 -05:00
2021-04-14 16:53:36 -05:00
## Footer columns
You can add various columns of links in the footer using the `data/footer_columns.yml` file.
Following is an example configuration:
```yaml
- title: My other projects
links:
- title: HydraPaper
link: https://hydrapaper.gabmus.org
- title: Ada UI
link: https://gitlab.com/gabmus/ada-ui
- title: About me
links:
- title: My personal website
link: https://gabmus.org
- title: My GitLab
link: https://gitlab.com/gabmus
- title: My GNOME GitLab
link: https://gitlab.gnome.org/gabmus
```
2021-05-04 08:21:14 -05:00
## Jumbotron
You can add a jumbotron at the beginning of the home page using the `data/jumbotron.yml` file.
Following is an example configuration:
```yaml
title: My awesome website
2021-07-05 07:00:51 -05:00
hugeTitle: false
subtitle: Some fancy subtitle
image: /jumbotron_image.svg
imagePosition: left # values: left, right, top, bottom
2021-05-04 08:21:14 -05:00
background: /img/jumbotron_bg.png
2021-07-08 02:56:16 -05:00
backgroundVideo: /jumbotron_video.mp4 # will replace the background image
# it's best to provide both an mp4 and a web source for the video for better compatibility
backgroundVideoMp4: /jumbotron_video.mp4
backgroundVideoWebm: /jumbotron_video.webm
2021-07-06 12:13:33 -05:00
videoOpacity: 1.0
2021-07-06 08:57:07 -05:00
textShadow: false
2021-07-05 07:00:51 -05:00
fullscreen: false
downArrow: false
2021-07-06 10:38:44 -05:00
whiteText: false # force white text in the jumbotron
2021-05-04 08:21:14 -05:00
links:
- title: About me
link: /pages/about
- title: Read my blog
link: /posts
```
2021-11-25 07:23:03 -06:00
# Post parameters
Every post can have various parameters in the frontmatter, here are some that you may find useful
2021-04-18 03:50:02 -05:00
2021-11-25 07:23:03 -06:00
- `title` : the title of the article
- `date` : usually automatically populated, holds the date and time of the post creation
- `description` : a brief description of the post, useful for SEO optimization
- `tags` : an array of tags, useful for searching similar articles
- `image` : a link to a feature image for the article, shown in the preview as well
- `featured` : boolean, indicate if the post should be shown as featured
- `comments` : boolean, if true it enables comments for the current post, if false it disables them (default is true)
- `showDate` : boolean, true by default, if false hides the date. Useful for non-article pages where the date isn't important
- `norss` : boolean, if set to true the page will be skipped in the rss feed
2021-04-14 16:53:36 -05:00
2021-04-19 02:57:44 -05:00
## Generate icons
It's best to use the provided `generate_icons.sh` script to generate all necessary icons for your website. This script requires ImageMagick, that you will need to install separately.
For the best results, place your logo in svg format inside the `static` directory of your website, rename it to `logo.svg` and then call `./themes/hugo-ficurinia/generate_icons.sh static/logo.svg` .
The script will take care of generating all the icons you need.
Finally, make sure to edit your config.toml to include the following:
```toml
# ...
[params]
logo = "/logo.svg"
favicon = "/favicon.png"
faviconIco = "/favicon.ico"
appletouch = "/apple-touch-icon.png"
svgicon = "/logo.svg"
# ...
```
2021-01-02 07:08:21 -06:00
## 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 |
2021-01-03 14:09:16 -06:00
| `layouts/partials/inject/header-after.html` | Before closing the header |
| `layouts/partials/inject/header-before.html` | At the beginning of the header |
2021-01-02 07:08:21 -06:00
2020-08-24 02:05:09 -05:00
# Does *Ficurinia* mean anything?
It's Sicilian for Indian fig, also known as prickly pear cactus.