[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgit
Subject:    Re: Table of Contents links using the format #link are not followed
From:       jean-christophe manciot <actionmystique () gmail ! com>
Date:       2018-08-25 7:39:04
Message-ID: CAKcFC3a2Q+Qy4NyW2EcLv+kTsivVrG5PUXRNU4Er2EAi-PVokQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Christian Hesse (list@eworm.de) has brilliantly added this feature with the
patch available here
<https://git.zx2c4.com/cgit/diff/filters/html-converters/md2html?h=ch/anchorlinks&id=42e70dcbe84e128ba23a25918e3d5d9aac656dc6>
                
.
It allows you to:
- add your own static table of contents and the links now point to the
right paragraph
- or add a [TOC] marker anywhere in the markdown file and let cgit
dynamically build your table of contents

I was able to test the about link with a toc having up to 5 levels of
indentation, which is much more than Gitlab is able to do (2).

Very nice ;-)

N.B: I have just realized that a copy of this message has been originally &
mistakenly sent as an answer to another thread. Sorry guys.

-- 
Jean-Christophe


[Attachment #5 (text/html)]

<div dir="ltr"><h3 class="gmail-m_6608505433237392207m_-2387007473169738696gmail-iw" \
style="overflow:hidden;white-space:nowrap;max-width:92%;font-size:0.75rem;margin:inher \
it;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;letter-spacing:0.3px;color:rgb(95,99,104);line-height:20px"><span \
name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px">Christian \
Hesse (</span><span style="font-weight:normal;color:rgb(85,85,85);font-size:12.8px"><a \
href="mailto:list@eworm.de" target="_blank">list@eworm.de</a></span>)  <span \
name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px;font-weight:normal">has \
brilliantly added this feature with the patch available  <a \
href="https://git.zx2c4.com/cgit/diff/filters/html-converters/md2html?h=ch/anchorlinks&amp;id=42e70dcbe84e128ba23a25918e3d5d9aac656dc6" \
target="_blank">here</a>.</span></h3><div><span name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px">It \
allows you to:</span></div><div><span name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px">- \
add your own static table of contents and the links now point to the right \
paragraph</span></div><div><span name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px">- \
or add a [TOC] marker anywhere in the markdown file and let cgit dynamically build \
your table of contents</span></div><div><span name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px"><br></span></div><div><span \
name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px">I \
was able to test the about link with a toc having up to 5 levels of indentation, \
which is much more than Gitlab is able to do (2).  </span></div><h3 \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-iw" \
style="overflow:hidden;white-space:nowrap;max-width:92%;font-size:0.75rem;margin:inher \
it;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;letter-spacing:0.3px;color:rgb(95,99,104);line-height:20px"><span \
name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px;font-weight:normal"> \
</span></h3><div><span name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px">Very \
nice ;-)</span></div><div><span name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px"><br></span></div><div><span \
name="Christian Hesse" \
class="gmail-m_6608505433237392207m_-2387007473169738696gmail-gD" \
style="color:rgb(32,33,36);font-size:0.875rem;display:inline;vertical-align:top;letter-spacing:0.2px;line-height:20px">N.B: \
I have just realized that a copy of this message has been originally &amp; mistakenly \
sent as an answer to another thread. Sorry guys.</span></div><div><br></div>-- \
<br><div dir="ltr" class="gmail_signature" \
data-smartmail="gmail_signature">Jean-Christophe</div></div>



_______________________________________________
CGit mailing list
CGit@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/cgit


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic