Opened 4 years ago

Closed 4 years ago

#8671 closed enhancement (implemented)

Add a custom role for trac tickets

Reported by: atagar Owned by: atagar
Priority: Low Milestone:
Component: Core Tor/Stem Version:
Severity: Keywords: website easy
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

It would be useful if, in our sphinx docs, we could use...

:trac:`1234`

... to link to ticket #1234 rather than need to provide a full url every time. This will make our docs more readable and less error prone, and is quite doable via a custom sphinx role. For information on how to do this see this tutorial (or his pycon presentation about it).

Child Tickets

Change History (2)

comment:1 Changed 4 years ago by ragwater

  • Status changed from new to needs_review

Hey,
I'm new to contributing to projects and I could use few pointers.

I tried to follow the linked tutorial.

Here's the commit:

https://github.com/ragwater/stem/commit/2c060b8d9a219185188b5fbe928c8d47a54f0242

It passes the test on my machine, but I'm unsure about the exact implementation details,

as of now :trac:`123` displays link as 'ticket #123', but I'm uncertain whether it's preferred over the mere 'ticket'.

I put trac.py in the docs/ folder, would that be the desired structure?

comment:2 Changed 4 years ago by atagar

  • Resolution set to implemented
  • Status changed from needs_review to closed

Hi ragwater, thanks for the patch! I made some minor tweaks and pushed...

https://gitweb.torproject.org/stem.git/commitdiff/f17e370?hp=fae5b1d

Much nicer and less error prone - thanks!

Note: See TracTickets for help on using tickets.