# Fotnotes in orgmode: The anchors seem wrong

**URL:** <https://discourse.gohugo.io/t/fotnotes-in-orgmode-the-anchors-seem-wrong/36283>\
**Category:** support\
**Created:** [December 31, 2021, 12:50am UTC](https://discourse.gohugo.io/t/fotnotes-in-orgmode-the-anchors-seem-wrong/36283 "2021-12-31T00:50:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![psmith1303](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/psmith1303/32/15469_2.png) [@psmith1303](https://discourse.gohugo.io/u/psmith1303)\
**Post date:** [December 31, 2021, 12:50am UTC](https://discourse.gohugo.io/t/fotnotes-in-orgmode-the-anchors-seem-wrong/36283/1 "2021-12-31T00:50:33Z")

</div>

When I click a footnote (any footnote) on a page, I get taken back to my homepage, rather than taken to the appropriate anchor on the current page.

I’m using orgmode formatted text with pagebundles and:

hugo v0.91.2-1798BD3F windows/amd64 BuildDate=2021-12-23T15:33:34Z VendorInfo=gohugoio

(I moved to this version today from 0.89.1 to see if it helped with this issue … it didn’t)

If I create a footnote, e.g., like this:

```auto
Very low on self discipline[fn:2]

[fn:2] Who doesn't love self discipline

```

The html code that is produced looks like this:

```auto
<p>Very low on self discipline<sup class="footnote-reference"><a id="footnote-reference-2" href="#footnote-2">2</a></sup></p>

```

and the target looks like this:

```auto
<div class="footnote-definition">
<sup id="footnote-2"><a href="#footnote-reference-2">2</a></sup>
<div class="footnote-body">
<p>Who doesn't love self discipline</p>
</div>
</div>

```

In my config.toml I have:

```auto
relativeURLS = false
canonifyURLs = true

```

I wonder what I might have done wrong. Any hints?

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [December 31, 2021, 1:52am UTC](https://discourse.gohugo.io/t/fotnotes-in-orgmode-the-anchors-seem-wrong/36283/2 "2021-12-31T01:52:56Z")

</div>

If you are using any javascript based dynamic content replacements check if they change the way the `#` works in navigation between content.

Without a complete repo to test with, we can’t say much more about potential issues.

---

<div class="post-metadata">

**Author:** ![psmith1303](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/psmith1303/32/15469_2.png) [@psmith1303](https://discourse.gohugo.io/u/psmith1303)\
**Post date:** [December 31, 2021, 1:59am UTC](https://discourse.gohugo.io/t/fotnotes-in-orgmode-the-anchors-seem-wrong/36283/3 "2021-12-31T01:59:17Z")

</div>

Thanks for a quick reply. There is no javascript on the site nowadays (I just removed the last bit today).

As for a repo, the complete site lives at: [GitHub - psmith1303/petersmith: My academic blog (mainly)](https://github.com/psmith1303/petersmith) and the example page on the live site is at [PeterSmith.org | Saku Mantere](https://petersmith.org/blog/2007/10/17/saku-mantere/)

(Oh, there is some templating for webmentions ‘in progress’ but I don’t think that’s related to this problem … which predates that).

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [December 31, 2021, 2:03am UTC](https://discourse.gohugo.io/t/fotnotes-in-orgmode-the-anchors-seem-wrong/36283/4 "2021-12-31T02:03:55Z")

</div>

Actually, on a quick scan it might be doing something. Disable it for a moment and test.

> <https://github.com/psmith1303/petersmith/blob/f014d4a21157d0fc5febb37144df9f5ec573f954/themes/NewPapyrus/static/js/webmention.js#L118>

---

<div class="post-metadata">

**Author:** ![pamubay](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pamubay/32/17838_2.png) [@pamubay](https://discourse.gohugo.io/u/pamubay)\
**Post date:** [December 31, 2021, 2:38am UTC](https://discourse.gohugo.io/t/fotnotes-in-orgmode-the-anchors-seem-wrong/36283/5 "2021-12-31T02:38:29Z")

</div>

Try remove this line:

> <https://github.com/psmith1303/petersmith/blob/master/themes/NewPapyrus/layouts/partials/head.html#L7>

---

<div class="post-metadata">

**Author:** ![psmith1303](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/psmith1303/32/15469_2.png) [@psmith1303](https://discourse.gohugo.io/u/psmith1303)\
**Post date:** [December 31, 2021, 3:43am UTC](https://discourse.gohugo.io/t/fotnotes-in-orgmode-the-anchors-seem-wrong/36283/6 "2021-12-31T03:43:06Z")

</div>

Whooho. Thank you.

Removing that line worked on my local `hugo server`, so I’ve made a commit and am pushing it out to Netlify.

Now to go and re-read the docs to figure out why I had that line there in the first place.

Thank you again.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [January 2, 2022, 3:43am UTC](https://discourse.gohugo.io/t/fotnotes-in-orgmode-the-anchors-seem-wrong/36283/7 "2022-01-02T03:43:36Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
