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

amp.rb: amphtml URL のミス #613

Closed
Nyoho opened this issue Jan 11, 2017 · 1 comment
Closed

amp.rb: amphtml URL のミス #613

Nyoho opened this issue Jan 11, 2017 · 1 comment

Comments

@Nyoho
Copy link
Member

Nyoho commented Jan 11, 2017

amphtml の URL がおかしいと気付きました。日記の個別ページなのに(トップページでもないのに) https://example.net/diary/?plugin=amp というURLになっています。

調べたところ、URI#join の query string の扱いの仕様のようでした。

まちゅダイアリーのように /YYYYMMDD.html なtDiaryであれば

URI.join( URI("https://example.net/diary/20190101.html"), '?plugin=amp')
# #<URI::HTTPS https://example.net/diary/20190101.html?plugin=amp>

となるのですが、うちのように /?date=YYYYMMDD なtDiaryだと

URI.join( URI("https://example.net/diary/?date=20190101"), '?plugin=amp')
# #<URI::HTTPS https://example.net/diary/?plugin=amp>

となってしまいます。後ほどPRを作成してみます。

@Nyoho
Copy link
Member Author

Nyoho commented Jan 12, 2017

#614 でマージされたので閉じます。

@Nyoho Nyoho closed this as completed Jan 12, 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
Development

No branches or pull requests

1 participant