File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
2- title : Use the MkDocs RSS Plugin with confidence
2+ title : Page with complete meta
33authors :
44 - Guts
55 - Tim Vink
66 - liang2kl
77date : 2020-03-20 10:20
8+ update : 2022-03-30 10:20
89description : First test page of mkdocs-rss-plugin test suite
910image : " https://svgsilh.com/png-512/97849.png"
1011tags :
Original file line number Diff line number Diff line change 1+ # Project information
2+ site_name : MkDocs RSS Plugin - TEST
3+ site_description : Basic setup to test against MkDocs RSS plugin
4+ site_author : Julien Moura (Guts)
5+ site_url : https://guts.github.io/mkdocs-rss-plugin
6+ copyright : ' Guts - In Geo Veritas'
7+
8+ # Repository
9+ repo_name : ' guts/mkdocs-rss-plugin'
10+ repo_url : ' https://github.com/guts/mkdocs-rss-plugin'
11+
12+ use_directory_urls : true
13+
14+ plugins :
15+ - rss :
16+ date_from_meta :
17+ as_creation : " date"
18+ as_update : " update"
19+ datetime_format : " %Y-%m-%d %H:%M"
20+
21+ theme :
22+ name : readthedocs
23+
24+ # Extensions to enhance markdown
25+ markdown_extensions :
26+ - meta
Original file line number Diff line number Diff line change @@ -174,6 +174,26 @@ def test_simple_build_disabled(self):
174174 self .assertEqual (cli_result .exit_code , 0 )
175175 self .assertIsNone (cli_result .exception )
176176
177+ def test_simple_build_item_dates (self ):
178+ with tempfile .TemporaryDirectory () as tmpdirname :
179+ cli_result = self .build_docs_setup (
180+ testproject_path = "docs" ,
181+ mkdocs_yml_filepath = Path ("tests/fixtures/mkdocs_dates_overridden.yml" ),
182+ output_path = tmpdirname ,
183+ )
184+ if cli_result .exception is not None :
185+ e = cli_result .exception
186+ logger .debug (format_exception (type (e ), e , e .__traceback__ ))
187+
188+ self .assertEqual (cli_result .exit_code , 0 )
189+ self .assertIsNone (cli_result .exception )
190+
191+ # created items
192+ feed_parsed = feedparser .parse (Path (tmpdirname ) / "feed_rss_created.xml" )
193+
194+ # updated items
195+ feed_parsed = feedparser .parse (Path (tmpdirname ) / "feed_rss_updated.xml" )
196+
177197 def test_simple_build_feed_length (self ):
178198 with tempfile .TemporaryDirectory () as tmpdirname :
179199 cli_result = self .build_docs_setup (
You can’t perform that action at this time.
0 commit comments