Spica Jekyll documentation
The sidebar and menu
Set Spica's logo, tagline, picture, menu, search link and profile icons, choose the left or right side, and see how the sidebar becomes a top bar on phones.
The sidebar is the fixed column that holds your name, menu and links. It stays in place while the page scrolls. Everything in it comes from spica: in _config.yml and from the author: box. There’s no separate sidebar file and no boxes to arrange.
What’s in it
On wide screens (about 1,024 pixels and up), from top to bottom:
- Your picture, if
spica.avataristrueandauthor.avataris set. - The logo: a small star mark and the name in
spica.logo. - The tagline.
- The menu.
- At the bottom: the search link, the light/dark button, your profile icons and a copyright line with your name and the year.
Logo, tagline and picture
author:
avatar: /assets/img/avatar.webp
spica:
logo: Spica
tagline: Notes on design, writing and the tools behind them.
avatar: true
logois the name. If it’s empty,titleis used.taglineis one or two lines under it. Leave it out to hide it.avatar: trueshows your picture over the name. Setfalseto hide it. The picture itself isauthor.avatar, the same one the author box and the About page use. See Pictures.
The star next to the name is drawn in _includes/sidebar.html, in the <svg class="logo__mark"> element. To use a different mark or none, edit or remove that element.
Left or right
spica:
sidebar: right
left is the default. With right, the sidebar moves to the right-hand side of wide screens. On phones it’s a top bar either way.
The menu
spica:
nav:
- label: Blog
url: /
- label: Projects
url: /projects/
- label: Archive
url: /archive/
- label: About
url: /about/
- label: Contact
url: /contact/
Each link has a label and a url. Write site addresses with a leading slash and the theme adds baseurl for you. A full address such as https://example.com/ works too.
A link lights up on its own page. It also lights up on the pages inside it, so /projects/ stays lit on every project page. The first link, /, stays lit on posts, category pages and the numbered pages of the home list (/page/2/).
To add a category or the Tags page to the menu, add a link to it. The tags page is at /tags/, and a category page is at /category/<name>/. The Tags page isn’t in the menu by default.
Search link
spica:
search: true
true shows a Search link in the sidebar (a search icon in the top bar on phones). It goes to /search/. false hides it. See Comments and search.
Profiles
spica:
social:
- label: GitHub
icon: github
url: https://github.com/your-name
- label: RSS
icon: rss
url: /feed.xml
labelis read aloud by screen readers. On the About and Contact pages it’s the visible link text.iconis the name of a file in_includes/icons/. The profile icons arex,facebook,instagram,pinterest,youtube,linkedin,github,mastodon,bluesky,rssandmail.urlis the profile address. Formail, writemailto:you@example.com. For the feed,/feed.xmlis made for you by thejekyll-feedplugin.
The same list shows in the sidebar as icons, and on the About and Contact pages as links with their labels. Leave social out to hide them all.
Use only icon names that have a file in _includes/icons/. A name with no file stops the build. To add another network, save its icon as _includes/icons/<name>.svg and use that name. The file holds only the drawing, with no <svg> tag around it: lines on a 24 × 24 grid. Look at github.svg or mail.svg in that folder for an example.
Light/dark button
The button is switched on by spica.theme_switch, in the “Look and feel” part of the settings. See Colors, fonts and CSS.
On phones
Below about 1,024 pixels the sidebar becomes a bar across the top, which stays at the top while you scroll. It holds the logo, a search icon, the light/dark button (when it’s on) and a menu button. The menu opens without JavaScript. It shows the tagline, the menu links and your profile icons. The picture is not shown in the top bar.
The copyright line at the bottom of the sidebar is hidden on phones. The footer line at the bottom of each page shows it there instead, with “Built with Jekyll”, an RSS link and a “Back to top” link.