TYPO3-Documentation / T3DocTeam

This repository is for the Documentation Team. To contribute, please see CONTRIBUTING.md For help and support on TYPO3, please see: https://typo3.org/help/
3 stars 1 forks source link

Reintroduce "start" anchors for start pages #198

Closed linawolf closed 1 year ago

linawolf commented 1 year ago

This enables us to link to all start pages with

:ref:`mytutorial:start` again
linawolf commented 1 year ago

Applied to all manuals and documented in How to document

linawolf commented 1 year ago

@sypets offered to replace all existing links like

:doc:`[a-zA-Z0-9]+:Index`

with :ref: links to start again

sypets commented 1 year ago

We have 2 cases (with and without anchor):

1.

:doc:`t3tsref:Index`

use regex:

:doc:`[a-zA-Z0-9]+:Index`
  1. with anchor
:doc:`TCA Reference <t3tca:Index>`

use regex:

:doc:`([a-zA-Z0-9 ]+) <[a-zA-Z0-9]+:Index>`

In directory above all TYPO3CMS repos:

list of repos (without anchor):

grep -l -r -P ':doc:`[a-zA-Z0-9]+:Index`' */Documentation | cut -f1 -d'/' | sort -u

change (without anchor)

grep -l -r -P ':doc:`[a-zA-Z0-9]+:Index`' */Documentation | while read i;do echo "$i";perl -pi -e 's/:doc:`([a-zA-Z0-9]+):Index`/:ref:`$1:start`/g' "$i";done

change with anchor:

grep -l -r -P ':doc:`[A-Za-z0-9 ]+ <[A-Za-z0-9]+:Index>`' */Documentation |  while read i;do echo "$i";perl -pi -e 's/:doc:`([A-Za-z0-9 ]+) <([A-Za-z0-9]+):Index>`/:ref:`$1 <$2:start>`/g' "$i";done
sypets commented 1 year ago

These were the manuals I had locally where I had hits, should be done now: