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
Copy link
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.

Copy link

CLAassistant commented Aug 18, 2016

CLA assistant check
All committers have signed the CLA.

@shapeshed shapeshed force-pushed the shapeshed:patch-1 branch Aug 19, 2016

@shapeshed shapeshed force-pushed the shapeshed:patch-1 branch Sep 21, 2016

@shapeshed shapeshed changed the title [fix] #2110 Tag ".net" creates invalid pagination 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 force-pushed the shapeshed:patch-1 branch to f772902 Oct 3, 2016

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

@spf13 spf13 force-pushed the gohugoio:master branch to f9c70c0 Oct 7, 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 gohugoio#1252
Fixes gohugoio#2110
Closes gohugoio#2374
Fixes gohugoio#1885
Fixes gohugoio#3102
Fixes gohugoio#3179
Fixes gohugoio#1641
Fixes gohugoio#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