vladris / tinkerer

Python blogging engine
https://vladris.com/tinkerer
Other
305 stars 81 forks source link

Using TOC in article breaks link in home page #23

Closed Marrin closed 11 years ago

Marrin commented 11 years ago

If a .. contents:: directive is used within an article the headline on the blog home page does not link to the article page any more.

christianjann commented 11 years ago

Could you give an example (upload it somewhere or attach a html file), I'm using the .. contents:: directive in nearly every blog post and I can't understand the problem at the moment.

Marrin commented 11 years ago

The second blog post on http://blog.marc.rintsch.de shows the symptom. It is not using the very latest tinkerer version yet but the problem is the same.

christianjann commented 11 years ago

It should work if you replace

.. contents:: Inhalt

with

.. contents:: Inhalt
  :depth: 2
  :local:

and it also looks a bit better (my opinion). This is no real fix, but let me know whether this fixes your problem.

PS: I would add a bit CSS from Sphinx to style the contents directive a bit, you can look for example into the dark theme:

div.topic {
    border: 1px solid #ccc;
    padding: 7px 7px 0 7px;
    margin: 10px 0 10px 0;
}

div.topic {
    background: none repeat scroll 0 0 #F8F8F8;
}

p.admonition-title, p.topic-title {
    font-size: 1.1em;
    font-weight: bold;
    margin: 0px 10px 5px 0px;
}
Marrin commented 11 years ago

Yes, that fixes the link problem. Thanks. ☺

christianjann commented 11 years ago

Nice. Hey @vladris I can't close the issue so if you're OK with that, then you can close it.

vladris commented 11 years ago

Sure. Thanks for your prompt reply Christian!