You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+57-27Lines changed: 57 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -309,8 +309,8 @@ Basically, the plugin aims to retrieve creation and update dates from git log. B
309
309
310
310
So, it's possible to use the dates manually specified into the [page metadata] through the [YAML frontmatter](https://www.mkdocs.org/user-guide/writing-your-docs/#meta-data).
311
311
312
-
-`as_creation`: meta tag name to use as creation date. Default to `False`.
313
-
-`as_update`: meta tag name to use as update date. Default to `False`.
312
+
-`as_creation`: meta tag name (or a dot-separated tag name) to use as creation date. Default to `False`.
313
+
-`as_update`: meta tag name (or a dot-separated tag name) to use as update date. Default to `False`.
314
314
-`datetime_format`: datetime format. Default to `"%Y-%m-%d %H:%M"`.
315
315
-`default_timezone`: timezone to use by default to make aware datetimes. Default to `UTC`. Introduced in version 1.3.0 with [PR 142](https://github.com/Guts/mkdocs-rss-plugin/pull/142).
316
316
-`default_time`: time to use if page contains only a date. Useful to avoid the 'midnight syndrome' or have to specify hour in every single page. Default to `None`. 24h-clock format is expected: `%H:%M`. Example: `"14:20"`. Introduced in version 1.4.0 with [PR 145](https://github.com/Guts/mkdocs-rss-plugin/pull/145).
@@ -319,30 +319,60 @@ So, it's possible to use the dates manually specified into the [page metadata] t
319
319
320
320
For example, in your `best_article.md` created in 2019, you can write the front-matter like this:
321
321
322
-
```markdown
323
-
---
324
-
title: "This page title is a perfect clickbait!"
325
-
authors:
326
-
- "Julien M."
327
-
date: "2020-10-22 17:18"
328
-
---
329
-
330
-
# This plugin will change your MkDocs life
331
-
332
-
Lorem ipsum [...]
333
-
```
334
-
335
-
So in your `mkdocs.yml` you will have:
336
-
337
-
```yaml
338
-
plugins:
339
-
- rss:
340
-
date_from_meta:
341
-
as_creation: "date"
342
-
as_update: false
343
-
datetime_format: "%Y-%m-%d %H:%M"
344
-
default_timezone: Europe/Paris
345
-
```
322
+
=== "tag name: `date`"
323
+
324
+
```markdown hl_lines="5"
325
+
---
326
+
title: "This page title is a perfect clickbait!"
327
+
authors:
328
+
- "Julien M."
329
+
date: "2020-10-22 17:18"
330
+
---
331
+
332
+
# This plugin will change your MkDocs life
333
+
334
+
Lorem ipsum [...]
335
+
```
336
+
337
+
So in your `mkdocs.yml` you will have:
338
+
339
+
```yaml hl_lines="4-5"
340
+
plugins:
341
+
- rss:
342
+
date_from_meta:
343
+
as_creation: "date"
344
+
as_update: false
345
+
datetime_format: "%Y-%m-%d %H:%M"
346
+
default_timezone: Europe/Paris
347
+
```
348
+
349
+
=== "dot-separated tag name: `date.created`"
350
+
351
+
```markdown hl_lines="6"
352
+
---
353
+
title: "This page title is a perfect clickbait!"
354
+
authors:
355
+
- "Julien M."
356
+
date:
357
+
created: "2020-10-22 17:18"
358
+
---
359
+
360
+
# This plugin will change your MkDocs life
361
+
362
+
Lorem ipsum [...]
363
+
```
364
+
365
+
So in your `mkdocs.yml` you will have:
366
+
367
+
```yaml hl_lines="4-5"
368
+
plugins:
369
+
- rss:
370
+
date_from_meta:
371
+
as_creation: "date.created"
372
+
as_update: false
373
+
datetime_format: "%Y-%m-%d %H:%M"
374
+
default_timezone: Europe/Paris
375
+
```
346
376
347
377
At the end, into the RSS you will get:
348
378
@@ -395,7 +425,7 @@ Default: `.*`.
395
425
396
426
### `url_parameters`: additional URL parameters
397
427
398
-
This option allows you to add parameters to the URLs of the RSS feed items. It works as a dictionary of keys/values that is passed to [Python *urllib.parse.urlencode*](https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlencode).
428
+
This option allows you to add parameters to the URLs of the RSS feed items. It works as a dictionary of keys/values that is passed to [Python *urllib.parse.urlencode*](https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlencode).
399
429
One possible use case is the addition of [Urchin Tracking Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters):
description: First test page of mkdocs-rss-plugin test suite
11
+
image: "https://svgsilh.com/png-512/97849.png"
12
+
tags:
13
+
- test
14
+
---
15
+
16
+
# Test page with meta
17
+
18
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
0 commit comments