Logs for #nikola for 2019-04-19

14:30:03 <brokencycle> Hi! It looks like the docs about Markdown are a bit lacking and/or dead.
14:30:34 <brokencycle> I have a blog with most posts being in Markdown that I would like to migrate.
15:13:46 <ChrisWarrick> brokencycle: What do the docs lack?
15:22:56 <brokencycle> @+ChrisWarrick: One, they link to a page about MarkdownExtensions, which is dead.
15:23:13 <brokencycle> Two, I am having trouble getting the metadata right. For some odd reason,
15:23:34 <ChrisWarrick> brokencycle: Are you reading the section about “Markdown metadata”?
15:24:07 <brokencycle> Yes. This link is dead: https://pythonhosted.org/Markdown/extensions/meta_data.html
15:24:26 <ChrisWarrick> brokencycle: This section has an unfortunate title
15:24:54 <brokencycle> I am trying to migrate from Pelican, but Nikola does not seem to find the 'date'.
15:25:10 <brokencycle> So I tried to grab that from the filename, but then, it does not get any of
15:25:16 <brokencycle> the other metadata from the file contents.
15:25:28 <brokencycle> Now all titles are wrong.
15:25:55 <brokencycle> I just installed with pip today. I'm on Python 3.7, if that matters.
15:26:19 <brokencycle> I was considering to write another MetadataExtractor class.
15:26:35 <ChrisWarrick> brokencycle: Do your posts have dates in their metadata content? If yes, what format?
15:26:46 <brokencycle> Yes, they do.
15:27:46 <ChrisWarrick> What date format are you using?
15:29:20 <brokencycle> https://pastebin.com/1C3Pkace
15:29:45 <brokencycle> I got the source code of 'dateutil' and extended the test cases with this date format.
15:29:51 <brokencycle> All the tests pass.
15:29:59 <brokencycle> So, no code change seems to be required.
15:30:16 <brokencycle> My guess is that Nikola does not understand the Markdown metadata header
15:30:27 <brokencycle> in the first place, because in the function that gets the date header,
15:30:34 <brokencycle> the 'value' parameter turns out to be empty.
15:30:48 <brokencycle> Ie., nothing to parse.
15:31:27 <brokencycle> If I look into the MetadataExtractor class, the relevant 're' requires the '.. ' prefix. 
15:31:37 <brokencycle> Or at least that's my impression.
15:33:23 <brokencycle> I meant: No code change to the datetutil package seems to be required.
15:37:25 <ChrisWarrick> brokencycle: The double dots are required for Nikola-style metadata.  Markdown-style metadata is handled by something else
15:38:08 <brokencycle> Yes. However, I did not find this other thing yet. That's why I thought of writing such a class.
15:38:30 <ChrisWarrick> brokencycle: It’s a compiler-based extractor
15:38:39 <brokencycle> Because, if I just run 'nikola build' with debug enabled, it will come out with a traceback.
15:39:19 <ChrisWarrick> brokencycle: Are you sure you added 'markdown.extensions.meta' to MARKDOWN_EXTENSIONS in conf.py?
15:41:36 <brokencycle> Nope. I am very sorry, but I managed to overlook that. :(
15:42:32 <ChrisWarrick> It’s okay.
15:44:35 -travis-ci:#nikola- getnikola/nikola#10575 (master - f426eba : Chris Warrick): The build passed.
15:44:35 -travis-ci:#nikola- Change view: https://github.com/getnikola/nikola/compare/f44f68c91e2b...f426eba692b3
15:44:35 -travis-ci:#nikola- Build details: https://travis-ci.org/getnikola/nikola/builds/522193224
16:59:50 <brokencycle> Ok... now I have HIDE_REST_DOCINFO = True, but the metadata still appears in the output.
17:18:30 <ChrisWarrick> brokencycle: That option is for reST metadata.  Markdown metadata should not appear in the post in any case.
17:19:29 <ChrisWarrick> brokencycle: The old contents (before you turned on the extension) might be errorneously cached; try `nikola build -a` and see if it helps.
17:57:27 <brokencycle> Actually, I have also some reST files, and the metadata appears in the pages generated for them. It's actually more confusing:
17:57:54 <brokencycle> I have enabled two languages, and from the same page source, one language version has the metadata, and the other doesn't.
18:38:25 <ChrisWarrick> brokencycle: That might be a bug.  Please create an issue on GitHub with a minimum reproducible example.
18:42:43 <brokencycle> Ok. Stay tuned.
19:12:05 <brokencycle> Thank you!