- Changed references in markup.md to update "data.html" to "data/" for clarity. - Updated metadata.md to correct the link to the general documentation. - Modified navbar.md to ensure stub values match the new permalink structure. - Adjusted tables.md to reflect the new permalink for the table visualization page. - Updated about.md to change the permalink from "/about.html" to "/about/" and revised content for clarity and impact. - Changed browse.md permalink from "/browse.html" to "/browse/" for consistency. - Added copyright.md page with copyright information and terms of use. - Updated data.md to change permalink from "/data.html" to "/data/" and added introductory content. - Created donate.md page to facilitate donations and acknowledge supporters. - Updated locations.md permalink from "/locations.html" to "/locations/" for consistency. - Changed map.md permalink from "/map.html" to "/map/" for uniformity. - Added erasure.md page discussing the historical context of Black queer Kansas Citians. - Updated out-there.md to correct the link to Lea Hopkins' interview. - Changed subjects.md permalink from "/subjects.html" to "/subjects/" for consistency. - Updated timeline.md permalink from "/timeline.html" to "/timeline/" for uniformity.
39 lines
1.4 KiB
Markdown
39 lines
1.4 KiB
Markdown
# Foot Section
|
|
|
|
All JS is loaded at the bottom of the page in "foot.html" include.
|
|
This ensures JS libraries are loaded in correct order and are optimized for page load.
|
|
|
|
First, "foot.html" adds bootstrap bundle and lazysizes assets which are required on all pages.
|
|
Next, any other chunks of JS are added via includes based on the page layout or front matter options.
|
|
|
|
Most default CB layouts have a custom JS component specific to the visualization.
|
|
In general, these are added to the page using the `custom-foot` option in the layout's front matter.
|
|
|
|
## custom-foot Option
|
|
|
|
To add an include to any page or layout, use the `custom-foot` option in the yml front matter.
|
|
|
|
Create the include in the "_includes" folder, then provide the filename in the `custom-foot` value.
|
|
Multiple includes can be added separated by a semicolon `;`.
|
|
|
|
### custom-foot Example
|
|
|
|
You want to add some custom JS to "pages/about.md".
|
|
|
|
Create the includes "_includes/js/example.html" and "_includes/js/another_example.html" with the module component parts.
|
|
The JS will be written in the includes inside of `<script>` tags, as if it is an html file.
|
|
|
|
In the file "pages/about.md", add the front matter option `custom-foot: js/example.html;js/another_example.html`.
|
|
The resulting front matter might look like:
|
|
|
|
```
|
|
---
|
|
title: About
|
|
layout: about
|
|
permalink: /about/
|
|
custom-foot: js/example.html;js/another_example.html
|
|
---
|
|
```
|
|
|
|
The two includes will be added by "foot.html", after bootstrap js is loaded.
|