gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.63k stars 7.45k forks source link

Footnotes should be removed from index page #7543

Closed carl-mastrangelo closed 2 years ago

carl-mastrangelo commented 4 years ago
$ hugo version
Hugo Static Site Generator v0.63.0-DEV linux/amd64 BuildDate: unknown

Does this issue reproduce with the latest release?

Not sure.

When an individual post contains footnote links (e.g. [^1])in the first few sentences, Hugo generates the correct superscript and links. However, when browsing the index of all posts, the footnote 1 is still present. The 1 is not linked, nor is it a superscript, making the snippet of the post look odd.

I would expect the footnote to be removed for an index page because otherwise it might appear incorrectly with other post snippets.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. 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 relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

carl-mastrangelo commented 3 years ago

This is still an issue

davidsneighbour commented 3 years ago

Could you please rename the issue into "Unlinked footnote reference is displayed in excerpts" or something along this line. The issue is, that footnote references in excerpt text are not removed, not that on index pages it shows. If the index page shows the full post then it's normal that the reference is shown.

Please also make sure, that it's not an issue with your theme. Some themes might have their own way to create excepts and then just markdownify or htmlify the content instead of using built in functionality. Like building the post, then cutting off the first 200 characters. In that case your theme should use a replace regexp to catch this special case. You probably want to have other links working in the excerpt.

The best way to solve this is to check the theme first and get back here with the results. For the future, such issues might be better reported on discourse.gohugo.io, someone can take a look at your code and find out, who the culprit is, and it might get resolved faster.

Could you please also provide a sample that can be tested instead of a "Not sure" in the "does it still fail on the latest version" part? Someone has to test it. The reason why updates are created is to fix these things and it might be fixed. There is no solution without upgrading in the end. And there are plenty of differences between 0.63-DEV and the current version so that solving this issue for you WILL result in problems with your existing site that are unrelated. Better early than later :smile:

carl-mastrangelo commented 3 years ago

Could you please rename the issue into "Unlinked footnote reference is displayed in excerpts" or something along this line.

I didn't test all excerpts, just the title page. I think it would be overbroad to claim the bug is for all excerpts when I didn't test that.

Could you please also provide a sample that can be tested instead of a "Not sure" in the "does it still fail on the latest version" part?

I feel like this question is not a good one to ask, since the version changes almost every day. I think a better question to ask here would be "what version are you on?", which I can respond with d61bee5e0916b5d2b388e66ef85c336312a21a06 .

The reason why updates are created is to fix these things and it might be fixed.

I appreciate this line of reasoning, but, if my issue is being marked as stale, it implies no one looked at it. It's hard to imagine the bug is fixed if no one recognized it.

Please also make sure, that it's not an issue with your theme.

I'm using hugo-kiara @ 98dce7e5a9931917b5246b88e45c27e8cd086964. I am not really familiar with the hugo source or the theme implementation, so I don't know how to check if it's a theme problem.

I was hoping someone familiar with hugo's source could look into this, as I really wouldn't know where to begin.

davidsneighbour commented 3 years ago

I was hoping someone familiar with hugo's source could look into this, as I really wouldn't know where to begin.

You expect developers with limited time on their hand to create your user case and reproduce it. Then you expect something to be done with your outdated development version. I don't think @bep will have time for this. Which is why I asked you some questions and asked to go to discourse.gohugo.io with your problem. It's the official support forum. As long as this bug can't be reproduced it won't receive much attention I am afraid.

I couldn't find hugo-kiara either. Seems to be a designer cloth name to Google. So I can't check if the theme (which is written in go template, not source code) has faults. I would have expected for this, if it's a real bug, to make more waves for other users.

carl-mastrangelo commented 3 years ago

You expect developers with limited time on their hand to create your user case and reproduce it.

I'm reporting a bug. It's up to the developers to do with it what they wish. I'm not asking for anything.

Edit: I mistyped the theme name, it's this one: https://themes.gohugo.io/hugo-kiera/

davidsneighbour commented 3 years ago

I'm reporting a bug. It's up to the developers to do with it what they wish. I'm not asking for anything.

The maintainers configured the stalebot to take care of it ;) That's why I started this conversation after your bump.

The theme linked appears to do nothing special to the summary. A quick search on the discourse.gohugo.io forum (official support forum for Hugo) brought only very old posts that look like the issue was solved a while back. Maybe updating Hugo works.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. 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 relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.