Skip to content

Commit

Permalink
[TASK] Move rest link chapters on separate pages (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
linawolf authored Jul 31, 2024
1 parent 07eabac commit 7964663
Show file tree
Hide file tree
Showing 8 changed files with 332 additions and 309 deletions.
309 changes: 0 additions & 309 deletions Documentation/Reference/ReStructuredText/Content/Links.rst

This file was deleted.

48 changes: 48 additions & 0 deletions Documentation/Reference/ReStructuredText/Links/Anchors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
:navigation-title: Anchors
.. include:: /Includes.rst.txt

.. index:: reST; Link targets
.. _link-anchor:
.. _link-targets-explanation:
.. _explicit-link-targets:

============
Link anchors
============

Link anchors assign a unique name to a headline and its section. These anchors
can be used in internal references and references between TYPO3 manuals.

As long as the anchor of a section stays the same the section can be moved to
another page or the headline can be renamed and references will still go to the
correct target.

You can define a link anchor with a label for a section.

In the following example, the link target :rst:`columns-inline` is assigned
to the section with the title "Inline columns".

Place the link anchor definition directly before the section header:

.. code-block:: rst
.. _inline-columns:
Inline columns
==============
Link anchors should contain alphanumeric signs plus hyphen: (`[a-z][0-9][-]`).
All other signs are automatically transformed by the symfony
:php:`Symfony\Component\String\Slugger\AsciiSlugger`.

A recommended recipe could be:

#. Duplicate the headline
#. Transform to lowercase
#. Replace all blanks by a hyphens `-`
#. Remove all non-alphanumeric characters or replace them by a hyphen `-`
#. Add `.. _` at the beginning.
#. Add `:` at the end.

We are currently trying to let `Fractor support <https://github.com/andreaswolf/fractor/issues/206>`
this and other transformations.
32 changes: 32 additions & 0 deletions Documentation/Reference/ReStructuredText/Links/Composer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
:navigation-title: Composer / Extensions
.. include:: /Includes.rst.txt

.. _linking-extensions:

==============================================
Linking Composer packages and TYPO3 extensions
==============================================

You can use the text role :rst:`:composer:` to create an infobox with information
and links to Packagist. This way you can link to any TYPO3 extension
that is also listed on Packagist like :composer:`georgringer/news` and
:composer:`b13/container`, any TYPO3 system extension like
:composer:`typo3/cms-adminpanel` and any other Composer package like
:composer:`typo3/testing-framework`:

.. code-block:: rst
This way you can link to any TYPO3 extension
that is also listed on packagist like :composer:`georgringer/news` and
:composer:`b13/container`, any TYPO3 system extension like
:composer:`typo3/cms-adminpanel` and any other Composer package like
:composer:`typo3/testing-framework`
If you want to link to the TYPO3 Extension Repository (TER) you can use the
text role :rst:`t3ext` instead and link extensions like :t3ext:`news` or
system extensions like :t3ext:`adminpanel`:

.. code-block:: rst
You can use the text role `t3ext` instead and link extensions like
:t3ext:`news` or system extensions like :t3ext:`adminpanel`
Loading

0 comments on commit 7964663

Please sign in to comment.