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

Tag ".net" creates invalid pagination #2110

Closed
patrick-steele opened this Issue Apr 27, 2016 · 7 comments

Comments

Projects
None yet
4 participants
@patrick-steele

patrick-steele commented Apr 27, 2016

I'm working on creating a blog and as a .NET programmer, a lot of my posts will be tagged with ".net". I noticed that when generating a paginator for this tag, the link to the next page is incorrect.

The initial page is generated as:

http://localhost:1313/tags/.net/

But the "Next" link is:

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

When it should be:

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

Not sure where the extra "index" is coming from.

@bep bep added the Bug label Apr 27, 2016

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Apr 27, 2016

Member

I suspect this is fixed in Hugo 0.16-DEV, though. You are using hugo 0.15, right?

Member

bep commented Apr 27, 2016

I suspect this is fixed in Hugo 0.16-DEV, though. You are using hugo 0.15, right?

@patrick-steele

This comment has been minimized.

Show comment
Hide comment
@patrick-steele

patrick-steele Apr 27, 2016

Yeah, sorry. Forgot to include the version number. This was 0.15.

I'll see if I can get it built locally and re-test. Would that be the pre16 branch?

patrick-steele commented Apr 27, 2016

Yeah, sorry. Forgot to include the version number. This was 0.15.

I'll see if I can get it built locally and re-test. Would that be the pre16 branch?

@moorereason

This comment has been minimized.

Show comment
Hide comment
@moorereason

moorereason Apr 27, 2016

Contributor

No, it's the master branch.

Contributor

moorereason commented Apr 27, 2016

No, it's the master branch.

@shapeshed

This comment has been minimized.

Show comment
Hide comment
@shapeshed

shapeshed Aug 3, 2016

Contributor

This is also an issue for me on 0.16.

|I have tag of node.js in my front matter.

  "tags": [
    "Node.js"
  ]

The initial page is ok /tags/node.js/ but the paginated links are /tags/node/index.js/page/2

Contributor

shapeshed commented Aug 3, 2016

This is also an issue for me on 0.16.

|I have tag of node.js in my front matter.

  "tags": [
    "Node.js"
  ]

The initial page is ok /tags/node.js/ but the paginated links are /tags/node/index.js/page/2

shapeshed added a commit to shapeshed/hugo that referenced this issue Oct 3, 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
@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Feb 28, 2017

Member

This issue has been automatically marked as stale because it has not been commented on for at least four months.

The resources of the Hugo team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still valuable, please open a proposal at https://discuss.gohugo.io/.

This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions.

Member

bep commented Feb 28, 2017

This issue has been automatically marked as stale because it has not been commented on for at least four months.

The resources of the Hugo team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still valuable, please open a proposal at https://discuss.gohugo.io/.

This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions.

@bep bep added the Stale label Feb 28, 2017

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Mar 1, 2017

Member

Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.

If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.

Member

bep commented Mar 1, 2017

Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.

If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.

@shapeshed

This comment has been minimized.

Show comment
Hide comment
@shapeshed

shapeshed Mar 1, 2017

Contributor

hey @bep. tested this against master. yes this is still an issue. categories with . within the string (e.g. Node.js) causes rendering and pagination to break.

I have created a test case repository here with replication steps.
https://github.com/shapeshed/hugo-2110

Contributor

shapeshed commented Mar 1, 2017

hey @bep. tested this against master. yes this is still an issue. categories with . within the string (e.g. Node.js) causes rendering and pagination to break.

I have created a test case repository here with replication steps.
https://github.com/shapeshed/hugo-2110

@bep bep removed the Stale label Mar 1, 2017

@moorereason moorereason added the Keep label Mar 1, 2017

@bep bep referenced this issue Mar 13, 2017

Closed

Add custom output formats #2828

26 of 26 tasks complete

bep added a commit to bep/hugo that referenced this issue 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