Change the settings
Most settings are in the _data folder. Each setting has a default. If you delete a setting, the site uses the default, so a missing setting does not break the site.
The files use YAML. Follow these rules:
- Keep the spaces at the start of each line. Use spaces, not tabs.
- If a value contains a colon followed by a space (
:), or starts with[,{,*,&,!,%,@, or a quotation mark, put the whole value in double quotation marks. - A line that starts with
#is a comment. The site ignores it. - For text that has more than one line, type
|after the colon. Then put the text on the next lines, indented by two more spaces.
Site title and address (_config.yml)
| Setting | What it does |
|---|---|
title |
The site name in the masthead and in browser tabs |
description |
A short description for search engines |
url |
The server address, such as https://example.org. No slash at the end. |
baseurl |
The folder the site is in on that server, such as /pll-static-pub. Use "" if the site is at the top level. |
Stop and restart bundle exec jekyll serve after you change _config.yml.
Site settings (_data/site.yml)
| Group | Settings |
|---|---|
signature |
A logo or signature in the masthead: image (path to the file), alt (a text description), link, and height |
favicon, apple_touch_icon |
The small icon in the browser tab |
noindex |
true asks search engines not to list the site. Use it for test sites. |
quick_exit |
The Quick Exit button: enabled, url (where it goes), label |
search |
enabled, the label in the search box, and include_docs (false leaves these docs out of search results) |
home |
The home page: the headline lines, hero_image, the Welcome card (welcome_text, video_embed_url), the Research Topics card (topic_buttons is how many featured topics to show as buttons, A to Z), and the Ask Us card (ask_text) |
sidebar |
The left column on topic pages: ask_librarian and disclaimer (each has enabled, title, and text), and related_title |
subpages_heading, subpages_open |
The “In this section” list |
page_details |
The “Last Updated” bar: labels, date_format, and whether to show the URL and the Print Page button |
footer |
unit and unit_url (who owns the site), address, email, phone, lines (text such as copyright notices), and links |
The Quick Exit button
The Quick Exit button helps a person leave the site fast, for example if someone who could hurt them walks in. When a person selects it, the site opens the Quick Exit page (Google by default) and replaces the current page, so the Back button does not return to this site. It does not clear the browser history. Tell readers about private browsing on your safety pages.
The home page video
To show a video on the home page, set video_embed_url to the video’s embed address, such as https://www.youtube-nocookie.com/embed/VIDEO-ID, and set video_title to a short description. The video must have captions.
The menu bar
The menu bar is set in _data/navigation.yml.
Each item in main has a title and a url. To give an item a dropdown menu, add one of these:
| Setting | What the dropdown shows |
|---|---|
children_from: /topics/how-do-i/ |
The pages one level below that page, automatically |
featured_topics: true |
The topics listed in featured_topics, then a “View all topics” link |
children: |
A list that you write, each item with a title and a url. The menu shows them in alphabetical order. |
featured_topics is a list of topic folder names from _topics, such as family-law. The menu and the home page show them in alphabetical order by title. The home page shows the first three as buttons (set topic_buttons in _data/site.yml to change how many).
Brand files (assets/brand/)
Put your logo, favicon, and home page photo in assets/brand/. Then type their paths in _data/site.yml, such as /assets/brand/logo.svg. The site adds the baseurl for you.