New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata present as comments in XML feeds #508
Comments
I am not seeing this right now. |
Indeed, it went away. |
Actually, I did reproduce it with current master just now. I had manually reset the files in output, and only after erasing output fully, the issue showed. I now suspect, that the metadata from comments in REST is to blame and that changing the posts to metadata in separate files, will resolve it. In my mind, comments in ReST should not lead to comments in resulting HTML at all, and should be directly removed after compilation. |
I agree that those comments at the beginning of the post (which I am not seeing yet) should not be there. However, in general, comments in rest are compiled into HTML comments by docutils, so not generating those is out of Nikola's scope. We can remove them using some filtering, but I am reluctant to make that the default behaviour for all comments. As a historical footnote: the reason why the metadata is in rest comments is so that the post files remain valid input for rst2html. |
I believe, the rest compiler should not see the ".. tags:" style comments at the start of the file at all. They are separated by a blank line, and in my mind, not really part of the file. Remaing valid input is all nice, I agree. But it's also useless input, isn't it. I am surprised you cannot reproduce it though. Did you notice, that you have the check the XML files? All of them have it for me. |
Yes. Here's what I do:
The rss.xml I get is as follows, no comments at al:
|
Ah yes, there is no metadata in "posts/1.txt" but in "posts/1.meta". The problem will only show if you merge the two files. |
Oh, silly me. Ok, will look into it. |
The fix was a bit bigger than expected, and it's not done for some compilers (HTML/PHP) because it was too much trouble and probably not worth it, but it should be good enough for your case :-) |
I think you forgot some debug prints inside, which make things look ugly. And it did not help at all, please re-open. |
Ah, seems you fixed that up already. |
Yeah, but I broke a bunch of integration tests somehow. So, handle with care for a couple of hours ;-) |
Hm, it's not working, I still have that diff: -<p>So fork away, like it, and stuff. Awaiting your pull requests...</p I looked at the commit, kind of looked sensible to me. Made sure I rebased |
Oh great, had to delete cache and/or doit.db and then it worked.That's not fun, and really hard to detect. |
Right, that's because of the cache, the comments were already there. |
-<title>Nuitka Home (Android)</title>http://nu
+<title>Nuitka Home (Android)</title>http://nu
+<!-- slug: letting-go-of-c11 -->
+<!-- date: 2012/10/27 08:59:07 -->
+<!-- tags: Nuitka,compiler,Python,Windows,Android -->
+<!-- link: -->
+<!-- description: How Nuitka came to use C++11 and then stop it. -->
+<p>This post is about Nuitka the Python compiler started out using C++0x
I totally don't want these comments. I suggest to remove them from HTML as well (I assume they are there, but I don't see them due to htmlcompressor)
The text was updated successfully, but these errors were encountered: