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

helpers: fix invalid pagination links #2374

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@shapeshed
Contributor

shapeshed commented Aug 18, 2016

The path helper incorrectly transforms valid urls causing issues with
pagination. One example is .net

http://localhost:1313/tags/.net/
to
http://localhost:1313/tags/index.net/page/2

The commit adds a regex test to check for .xml or .html extensions
and applies the transformation on a match.

This allows valid URLs like /foo/index.html/bar to also be passed
through.

Fixes #2110

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Aug 18, 2016

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Aug 18, 2016

CLA assistant check
All committers have signed the CLA.

@shapeshed shapeshed changed the title from [fix] #2110 Tag ".net" creates invalid pagination to helpers: fix invalid pagination links fixes #2110 Sep 21, 2016

helpers: fix invalid pagination links
The path helper incorrectly transforms valid urls causing issues with
pagination. One example is `.net`

http://localhost:1313/tags/.net/
to
http://localhost:1313/tags/index.net/page/2

The commit adds a regex test to check for `.xml` or `.html` extensions
and applies the transformation on a match.

This allows valid URLs like /foo/index.html/bar to also be passed
through.

Fixes #2110

@shapeshed shapeshed changed the title from helpers: fix invalid pagination links fixes #2110 to helpers: fix invalid pagination links Oct 3, 2016

@bep bep referenced this pull request Mar 13, 2017

Closed

Add custom output formats #2828

26 of 26 tasks complete

bep added a commit to bep/hugo that referenced this pull request Mar 27, 2017

hugolib: Refactor/-work the permalink/target path logic
This is a pretty fundamental change in Hugo, but absolutely needed if we should have any hope of getting "multiple outputs" done.

This commit's goal is to say:

* Every file target path is created by `createTargetPath`, i.e. one function for all.
* That function takes every page and site parameter into account, to avoid fragile string parsing to uglify etc. later on.
* The path creation logic has full test coverage.
* All permalinks, paginator URLs etc. are then built on top of that same logic.

Fixes #1252
Fixes #2110
Closes #2374
Fixes #1885
Fixes #3102
Fixes #3179
Fixes #1641
Fixes #1989

@bep bep closed this in 6bf010f Mar 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment