Skip to content

Commit a6dfa18

Browse files
refactor(config_comments): embed property comments in the katharsis.config.toml file (#385)
Signed-off-by: Shigure Kurosaki <[email protected]>
1 parent e90db4a commit a6dfa18

File tree

3 files changed

+69
-3
lines changed

3 files changed

+69
-3
lines changed
Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,43 @@
1-
# Documentation: https://github.com/arghena/katharsis/blob/canary/README.md#properties
1+
# NOTE: You can refer to the [RSS 2.0 at Harvard Law](https://cyber.harvard.edu/rss/rss.html) for more detailed documentation.
22

33
[rss]
4+
# The title of the website
45
title = "The React Framework for the Web"
6+
# A description of the website
57
description = "Used by some of the world's largest companies, Next.js enables you to create high-quality web applications with the power of React components."
8+
# The main URL of the website
9+
# NOTE: The `rss.site_url` property should not include a trailing slash (for example, `https://example.com` rather than `https://example.com/`).
610
site_url = "https://nextjs.org"
11+
# Path to the channel's logo
12+
# NOTE: The `rss.image` property is relative to the `rss.site_url`, for example, `favicon.png` corresponds to `https://example.com/favicon.png`.
713
image = "favicon.png"
14+
# Copyright information
815
copyright = "© 2024 Vercel Inc"
16+
# Preferred language
917
language = "en"
18+
# Path to the local output RSS file
19+
# NOTE: The `rss.output` property specifies the path relative to the working directory (for example, `rss.xml` corresponds to `./rss.xml`).
1020
output = "rss.xml"
1121

1222
[article]
23+
# The tag containing the article's title
1324
title = "h1"
25+
# The tag or attribute containing the article's description
1426
description = "[data-mdx-description]"
27+
# The HTML files that needs to be parsed
28+
# NOTE: The `article.input` property corresponds to the file stem (`*`), which is the same as the article's URL slug.
1529
input = ".next/server/app/articles/*.html"
30+
# Information about the article's author
1631
author = { name = "Vercel Inc", email = "[email protected]" }
32+
# The relative prefix for the article's URL
1733
prefix = "articles"
34+
# The tag or attribute containing the article's content
1835
content = "[data-mdx-content]"
36+
# The tag containing the article's publication date
37+
# NOTE: The `article.date` property's tag must include a [datetime](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time) attribute, and the attribute value must follow the `%Y-%m-%d` format.
1938
date = "time"
39+
# The image files to be used as the article cover
40+
# NOTE: The `article.image` property's folder name (`**`) must match the article's URL slug.
2041
image = "app/articles/**/opengraph-image.png"
42+
# Whether to sort articles by their publication date
2143
sort = true

src/cmd/katharsis.config.toml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,43 @@
1-
# Documentation: https://github.com/arghena/katharsis/blob/canary/README.md#properties
1+
# NOTE: You can refer to the [RSS 2.0 at Harvard Law](https://cyber.harvard.edu/rss/rss.html) for more detailed documentation.
22

33
[rss]
4+
# The title of the website
45
title = "Your Website Title"
6+
# A description of the website
57
description = "Your Website Description"
8+
# The main URL of the website
9+
# NOTE: The `rss.site_url` property should not include a trailing slash (for example, `https://example.com` rather than `https://example.com/`).
610
site_url = "https://example.com"
11+
# Path to the channel's logo
12+
# NOTE: The `rss.image` property is relative to the `rss.site_url`, for example, `favicon.png` corresponds to `https://example.com/favicon.png`.
713
image = "favicon.png"
14+
# Copyright information
815
copyright = "© Year Your Name"
16+
# Preferred language
917
language = "en"
18+
# Path to the local output RSS file
19+
# NOTE: The `rss.output` property specifies the path relative to the working directory (for example, `rss.xml` corresponds to `./rss.xml`).
1020
output = "rss.xml"
1121

1222
[article]
23+
# The tag containing the article's title
1324
title = "h1"
25+
# The tag or attribute containing the article's description
1426
description = "[data-description]"
27+
# The HTML files that needs to be parsed
28+
# NOTE: The `article.input` property corresponds to the file stem (`*`), which is the same as the article's URL slug.
1529
input = "articles/*.html"
30+
# Information about the article's author
1631
author = { name = "Your Name", email = "Your Email" }
32+
# The relative prefix for the article's URL
1733
prefix = "articles"
34+
# The tag or attribute containing the article's content
1835
content = "[data-content]"
36+
# The tag containing the article's publication date
37+
# NOTE: The `article.date` property's tag must include a [datetime](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time) attribute, and the attribute value must follow the `%Y-%m-%d` format.
1938
date = "time"
39+
# The image files to be used as the article cover
40+
# NOTE: The `article.image` property's folder name (`**`) must match the article's URL slug.
2041
image = "articles/**/image.png"
42+
# Whether to sort articles by their publication date
2143
sort = true

tests/katharsis.config.toml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,43 @@
1-
# Documentation: https://github.com/arghena/katharsis/blob/canary/README.md#properties
1+
# NOTE: You can refer to the [RSS 2.0 at Harvard Law](https://cyber.harvard.edu/rss/rss.html) for more detailed documentation.
22

33
[rss]
4+
# The title of the website
45
title = "The React Framework for the Web"
6+
# A description of the website
57
description = "Used by some of the world's largest companies, Next.js enables you to create high-quality web applications with the power of React components."
8+
# The main URL of the website
9+
# NOTE: The `rss.site_url` property should not include a trailing slash (for example, `https://example.com` rather than `https://example.com/`).
610
site_url = "https://nextjs.org"
11+
# Path to the channel's logo
12+
# NOTE: The `rss.image` property is relative to the `rss.site_url`, for example, `favicon.png` corresponds to `https://example.com/favicon.png`.
713
image = "favicon.png"
14+
# Copyright information
815
copyright = "© 2024 Vercel Inc"
16+
# Preferred language
917
language = "en"
18+
# Path to the local output RSS file
19+
# NOTE: The `rss.output` property specifies the path relative to the working directory (for example, `rss.xml` corresponds to `./rss.xml`).
1020
output = "tmp/rss.xml"
1121

1222
[article]
23+
# The tag containing the article's title
1324
title = "h1"
25+
# The tag or attribute containing the article's description
1426
description = "[data-mdx-description]"
27+
# The HTML files that needs to be parsed
28+
# NOTE: The `article.input` property corresponds to the file stem (`*`), which is the same as the article's URL slug.
1529
input = "examples/next.js/.next/server/app/articles/*.html"
30+
# Information about the article's author
1631
author = { name = "Vercel Inc", email = "[email protected]" }
32+
# The relative prefix for the article's URL
1733
prefix = "articles"
34+
# The tag or attribute containing the article's content
1835
content = "[data-mdx-content]"
36+
# The tag containing the article's publication date
37+
# NOTE: The `article.date` property's tag must include a [datetime](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time) attribute, and the attribute value must follow the `%Y-%m-%d` format.
1938
date = "time"
39+
# The image files to be used as the article cover
40+
# NOTE: The `article.image` property's folder name (`**`) must match the article's URL slug.
2041
image = "examples/next.js/app/articles/**/opengraph-image.png"
42+
# Whether to sort articles by their publication date
2143
sort = true

0 commit comments

Comments
 (0)