Skip to content
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

[static_comments] Support more metadata formats via metadata extractors #241

Merged
merged 7 commits into from Jul 24, 2017

Conversation

@felixfontein
Copy link
Contributor

@felixfontein felixfontein commented Jul 23, 2017

Fixes #232

It uses the metadata extractors introduced in getnikola/nikola#2861, which will be available in Nikola v8.

@felixfontein
Copy link
Contributor Author

@felixfontein felixfontein commented Jul 23, 2017

The main code change is in b2b1e2f, the other commits are copying the plugin from v7/ to v8/ (d7b12b3), preparation (0cbe195) and documentation and version bumping (36310dd).

Copy link
Member

@Kwpolska Kwpolska left a comment

LGTM

found_in_priority = False
for extractor in self.site.metadata_extractors_by['priority'].get(priority, []):
# We need to do a first check ourselves since metadata_extractors.check_conditions
# expects a post object (to check the compiler, if MetaCondition.compiler is used).

This comment has been minimized.

@Kwpolska

Kwpolska Jul 23, 2017
Member

This could be fixed upstream (in check_conditions) — care to make a PR?

This comment has been minimized.

"""Add static comments to posts."""

# Used to parse comment headers
_header_regex = re.compile('^\.\. (.*?): (.*)')

This comment has been minimized.

@Kwpolska

Kwpolska Jul 23, 2017
Member

This is unused.

This comment has been minimized.

@felixfontein

felixfontein Jul 24, 2017
Author Contributor

Ah yes, I forgot to remove that.

@felixfontein felixfontein merged commit d2f769d into master Jul 24, 2017
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/travis-ci/push The Travis CI build could not complete due to an error
Details
@felixfontein
Copy link
Contributor Author

@felixfontein felixfontein commented Jul 24, 2017

Thanks for reviewing!

@felixfontein felixfontein deleted the static-comments-more-metadata-formats branch Jul 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants