test: Custom config for build

This commit is contained in:
Ed Page 2024-04-15 11:21:27 -05:00
parent 0f72122831
commit 72f08d2dd1
26 changed files with 309 additions and 0 deletions

View file

@ -0,0 +1,2 @@
syntax_highlight:
enabled: false

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>test</title>
</head>
<body>
<h1>{{ page.permalink }}</h1>
{{ page.content }}
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - {{ page.permalink }}</title>
</head>
<body>
{{ page.content }}
</body>
</html>

View file

@ -0,0 +1,8 @@
---
layout: default.liquid
---
This is my Index page!
{% for post in collections.posts.pages %}
<a href="{{post.permalink}}">{{ post.title }}</a>
{% endfor %}

View file

@ -0,0 +1,10 @@
---
layout: posts.liquid
title: Custom paths are available to non-posts
published_date: 2014-08-22 15:36:20 +0100
permalink: /test/hello.html
---
# {{ page.title }}
This asserts that you can specify custom file paths

View file

@ -0,0 +1,10 @@
---
layout: posts.liquid
title: All date variables
published_date: 2015-05-03 01:05:20 +0100
permalink: /{{year}}/{{month}}/{{i_month}}/{{day}}/{{i_day}}/{{hour}}/{{minute}}/{{second}}/
---
# {{ page.title }}
This checks that all date variables are interpolated correctly into the path.

View file

@ -0,0 +1,10 @@
---
layout: posts.liquid
title: Custom paths with leading slash
published_date: 2015-05-03 02:05:20 +0100
permalink: /test/thing2.html
---
# {{ page.title }}
This asserts that you can specify custom file paths with a leading slash and it doesn't make a difference.

View file

@ -0,0 +1,10 @@
---
layout: posts.liquid
title: Custom paths
published_date: 2015-05-03 03:05:20 +0100
permalink: /test/thing.html
---
# {{ page.title }}
This asserts that you can specify custom file paths

View file

@ -0,0 +1,12 @@
---
layout: posts.liquid
title: Date variables
published_date: 2015-05-03 04:05:20 +0100
permalink: /{{year}}/{{data.thing}}/
data:
thing: hello
---
# {{ page.title }}
This asserts interpolation of date variables and other variables.

View file

@ -0,0 +1,10 @@
---
layout: posts.liquid
title: Boom without trailing slash
published_date: 2015-05-03 05:05:20 +0100
permalink: /test/thing4
---
# {{ page.title }}
This asserts that custom paths without a file extension get made into a folder with an index.html file, even when the user did not specify a trailing slash.

View file

@ -0,0 +1,10 @@
---
layout: posts.liquid
title: Boom
published_date: 2015-05-03 06:05:20 +0100
permalink: /test/thing3/
---
# {{ page.title }}
This asserts that custom paths without a file extension get made into a folder with an index.html file.

View file

@ -0,0 +1,9 @@
---
layout: posts.liquid
title: Custom paths
published_date: 2015-05-03 07:05:20 +0100
---
# {{ page.title }}
This asserts that you can have normal and custom file paths side by side.

View file

@ -0,0 +1,12 @@
---
layout: posts.liquid
title: Variables
published_date: 2015-05-03 08:05:20 +0100
permalink: /test/{{data.thing}}/
data:
thing: hello
---
# {{ page.title }}
This asserts that custom paths without a file extension get made into a folder with an index.html file.

View file

@ -0,0 +1,13 @@
---
layout: posts.liquid
title: Variables file name
published_date: 2015-05-03 09:05:20 +0100
permalink: /test/{{data.thing}}/{{data.thang}}.abc
data:
thing: hello
thang: world
---
# {{ page.title }}
This asserts that you can substitute any part of the url with custom variables

View file

@ -0,0 +1,18 @@
```console
$ cobalt -v build --destination _dest
WARN: No _cobalt.yml file found in current directory, using default config.
...
$ cobalt -v build --config _cobalt_testing.yml --destination _dest
Building from `.` into `[CWD]/_dest`
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
DEBUG: built glob set; 5 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
DEBUG: Loading data from `./_data`
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
DEBUG: built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
DEBUG: Loading snippets from `./_includes`
Build successful
```

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - 2015/05/5/03/3/01/05/20/</title>
</head>
<body>
<h1>All date variables</h1>
<p>This checks that all date variables are interpolated correctly into the path.</p>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - 2015/hello/</title>
</head>
<body>
<h1>Date variables</h1>
<p>This asserts interpolation of date variables and other variables.</p>
</body>
</html>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<title>test</title>
</head>
<body>
<h1>index.html</h1>
This is my Index page!
<a href="test/hello/world.abc">Variables file name</a>
<a href="test/hello/">Variables</a>
<a href="posts/no-path.html">Custom paths</a>
<a href="test/thing3/">Boom</a>
<a href="test/thing4">Boom without trailing slash</a>
<a href="2015/hello/">Date variables</a>
<a href="test/thing.html">Custom paths</a>
<a href="test/thing2.html">Custom paths with leading slash</a>
<a href="2015/05/5/03/3/01/05/20/">All date variables</a>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - posts/no-path.html</title>
</head>
<body>
<h1>Custom paths</h1>
<p>This asserts that you can have normal and custom file paths side by side.</p>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - test/hello.html</title>
</head>
<body>
<h1>Custom paths are available to non-posts</h1>
<p>This asserts that you can specify custom file paths</p>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - test/hello/</title>
</head>
<body>
<h1>Variables</h1>
<p>This asserts that custom paths without a file extension get made into a folder with an index.html file.</p>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - test/hello/world.abc</title>
</head>
<body>
<h1>Variables file name</h1>
<p>This asserts that you can substitute any part of the url with custom variables</p>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - test/thing.html</title>
</head>
<body>
<h1>Custom paths</h1>
<p>This asserts that you can specify custom file paths</p>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - test/thing2.html</title>
</head>
<body>
<h1>Custom paths with leading slash</h1>
<p>This asserts that you can specify custom file paths with a leading slash and it doesn't make a difference.</p>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - test/thing3/</title>
</head>
<body>
<h1>Boom</h1>
<p>This asserts that custom paths without a file extension get made into a folder with an index.html file.</p>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>My blog - test/thing4</title>
</head>
<body>
<h1>Boom without trailing slash</h1>
<p>This asserts that custom paths without a file extension get made into a folder with an index.html file, even when the user did not specify a trailing slash.</p>
</body>
</html>