From 6aeef3382a2cb6e2a39efb7daa751000c77b8e3f Mon Sep 17 00:00:00 2001 From: epage Date: Fri, 12 Jul 2024 03:50:43 +0000 Subject: [PATCH] deploy: dce0c77ec794a18d08e2e80b467eb9404c7f03f6 --- docs/data/index.html | 9 +++++---- docs/directory/index.html | 2 +- docs/variables/index.html | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/data/index.html b/docs/data/index.html index 20c9013..376325a 100644 --- a/docs/data/index.html +++ b/docs/data/index.html @@ -62,16 +62,17 @@

Data Files

-

Cobalt supports loading yaml, json, and -toml from _data -and making it available as site.data.<DIR>.<FILE>.

+

Cobalt reads data from any yaml, json, and +toml files in the _data directory +and merges them into the site.data variable, making +them available as site.data.<DIR>.<FILE>.

Example

In _data/animals/dogs.yml:

 - name: Corgi
 - name: Malamute
 
-

which can be accessed via site.data.animals.dogs.

+

which liquid templates can access via site.data.animals.dogs.

You can now render the list in a template:

 <ul>
diff --git a/docs/directory/index.html b/docs/directory/index.html
index 6446923..2c879a1 100644
--- a/docs/directory/index.html
+++ b/docs/directory/index.html
@@ -96,7 +96,7 @@ 

Directory Structure

_cobalt.ymlSite-wide configuration file _layoutsTemplates that wrap pages. The layout is chosen in the frontmatter _includesLiquid snippets of content to be shared among layouts or pages. -_dataData files that will be loaded as part of the {{ site.data }} variable. +_dataData files in this directory are loaded as part of the {{ site.data }} variable. _sassSass snippets that can be imported into your .scss files. _siteThe output directory of cobalt. Can be modified in _cobalt.yml. _defaultscobalt new initializes files from here based on the collection name. diff --git a/docs/variables/index.html b/docs/variables/index.html index cd680a3..4abe1ae 100644 --- a/docs/variables/index.html +++ b/docs/variables/index.html @@ -90,7 +90,7 @@

Site Variables

site.titleStringThe title of the entire site, see _cobalt.yml. site.descriptionStringThe description of the entire site, see _cobalt.yml. site.base_urlStringThe URL of your site, see _cobalt.yml. This is helpful for making absolute URLs, particularly when run within cobalt serve. -site.dataObjectThe merged result of _data and site: data. +site.dataObjectThe merged result of data files in the _data directory and site: data in _cobalt.yml. site.timeDateTimeA liquid_core::model::DateTime representing the time of the website re-generation.

Page Variables