

TITLE
[Good first issue] Documentation links in older docs versions

COMMENTS
3

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
# 🚀 Feature request

This is a documentation request in order to make it easier to find corresponding examples in the documentation. 

Good first issue if you want to get acquainted with the docs and how to build docs using Sphinx!

## Current issue

Here's the issue: currently, if one goes to an older documentation version to check the "examples" page, for example, [v2.6.0](https://huggingface.co/transformers/v2.6.0/examples.html), all links point towards the `master` branch. 

For example, the link towards `run_tf_glue.py` is the following: https://github.com/huggingface/transformers/blob/master/examples/run_tf_glue.py

As this points towards the `master` branch, it is prone to breaking as files can (and probably will) be moved around as versions come out. It is the case for this example, as the `run_tf_glue.py` script is not in `examples/` anymore, but in `examples/text-classification/`. 

I think we need a way to ensure that all links point toward their appropriate version, and the easiest would be to point to a given tag. Since we're looking at the version `v2.6.0`, it makes sense to point towards the tag v2.6.0: https://github.com/huggingface/transformers/blob/v2.6.0/examples/run_tf_glue.py

This way links get frozen in time and redirect to actual files corresponding to their description and behaviour as stated in the docs.

## Resolution

I believe the easiest change would be to use sphinx variables in order to do this. Probably either [rst_epilog](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-rst_epilog) or [rst_prolog](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-rst_prolog) could be useful here.

Some useful links: [rst_epilog](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-rst_epilog), [rst_prolog](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-rst_prolog)