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

Uses master post and URL to set @url and @name. #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

njpearman
Copy link

Hi. I've been using your amp-jekyll plugin on a blog, but I've had a problem when using it with the jekyll-sitemap plugin. The AMP files were added to the sitemap, but the .html extension for the generated AMP posts was excluded, meaning the sitemap links where broken. This is because the jekyll-sitemap plugin uses Jekyll::Page#url to output the <loc> of each post in the generated sitemap, and amp-jekyll overrides @url with dir, which doesn't include the extension.

I've made this change, which uses the Jekyll::URL class to set @url in the Jekyll::AmpPage constructor. This fixes my problem above. I don't know whether this negatively impacts things elsewhere though... :S

Does this work as a general enhancement to amp-jekyll? I can tidy up the changes, such as constructor args if it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant