Skip to content

Commit

Permalink
[Backport 13.4] [TASK] Document possible files in the site folder (#5308
Browse files Browse the repository at this point in the history
)

* [TASK] Document possible files in the site folder

Manual backport to 12.4 needed

Releases: main, 13.4

* Update Documentation/Administration/DirectoryStructure/SiteFolder.rst

* Update Documentation/Administration/DirectoryStructure/SiteFolder.rst

Co-authored-by: Stefan Frömken <[email protected]>

* Update SiteFolder.rst

* Apply suggestions from code review

Co-authored-by: Stefan Frömken <[email protected]>

---------

Co-authored-by: lina.wolf <[email protected]>
Co-authored-by: Stefan Frömken <[email protected]>
Co-authored-by: Lina Wolf <[email protected]>
  • Loading branch information
4 people authored Feb 3, 2025
1 parent aceb2c6 commit fbbe005
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,8 @@ This path can be retrieved from the Environment API, see
:file:`typo3conf/sites/`
~~~~~~~~~~~~~~~~~~~~~~~~

The folder :file:`typo3conf/sites/` contains subfolders for each site.

The following files are processed:

* :file:`config.yaml` for the :ref:`site configuration <sitehandling>`
* :file:`settings.yaml` for the :ref:`site settings <sitehandling-settings>`
* :file:`csp.yaml` for a
:ref:`site-specific Content Security Policy <content-security-policy-site>`
The folder :file:`typo3conf/sites/` contains subfolders, one for each site
in the installation. See chapter :ref:`site-folder`.

.. _legacy-directory-typo3conf-system:

Expand Down
13 changes: 4 additions & 9 deletions Documentation/Administration/DirectoryStructure/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,8 @@ contains installation-wide configuration.
:file:`config/sites/`
~~~~~~~~~~~~~~~~~~~~~

The folder :file:`config/sites/` contains subfolders for each site.

The following files are processed:

* :file:`config.yaml` for the :ref:`site configuration <sitehandling>`
* :file:`settings.yaml` for the :ref:`site settings <sitehandling-settings>`
* :file:`csp.yaml` for a
:ref:`site-specific Content Security Policy <content-security-policy-site>`

The folder :file:`config/sites/` contains subfolders, one for each site
in the installation. See chapter :ref:`site-folder`.

.. _directory-config-system:

Expand Down Expand Up @@ -321,5 +314,7 @@ Upon installation , Composer creates a symlink from packages to
.. toctree::
:titlesonly:
:hidden:
:glob:

ClassicInstallations
*
100 changes: 100 additions & 0 deletions Documentation/Administration/DirectoryStructure/SiteFolder.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.. include:: /Includes.rst.txt

.. _site-folder:

===========
Site folder
===========

The site folder (:file:`config/sites/my-site` in Composer-based installations,
:file:`typo3conf/sites/my-site` in Classic installations) **must** contain the
following file:

.. typo3:file:: config.yaml
:name: site-config-yaml
:scope: site
:composerPath: /config/sites/my-site/
:classicPath: /typo3conf/sites/my-site/
:regex: /^.*(config|typo3conf)\/sites\/[\w-]+\/config\.yaml$/
:shortDescription: Contains the site configuration

Contains the site configuration. See chapter
`Site handling <https://docs.typo3.org/permalink/t3coreapi:sitehandling>`_
for details.

.. contents:: Optional files in the site folder

.. _site-folder-configuration:

Additional configuration files in the site folder
=================================================

The site folder may also contain the following files:

.. typo3:file:: settings.yaml
:name: site-settings-yaml
:scope: site
:composerPath: /config/sites/my-site/
:classicPath: /typo3conf/sites/my-site/
:regex: /^.*(config|typo3conf)\/sites\/[\w-]+\/settings\.yaml$/
:shortDescription: Site specific settings

See chapter `Site settings <https://docs.typo3.org/permalink/t3coreapi:sitehandling-settings>`_.
If the `Site settings editor <https://docs.typo3.org/permalink/t3coreapi:site-settings-editor>`_
is being used in the backend module :guilabel:`Site Management > Settings`
changes are saved to this file.

.. typo3:file:: csp.yaml
:scope: site
:composerPath: /config/sites/my-site/
:classicPath: /typo3conf/sites/my-site/
:regex: /^.*(config|typo3conf)\/sites\/\w+\/csp\.yaml$/
:shortDescription: Content Security Policy

Used for a
:ref:`site-specific Content Security Policy <content-security-policy-site>`.

.. _site-folder-typoscript:

The site as frontend TypoScript provider
========================================

If the site should be used as TypoScript provider
(see `Site as a TypoScript provider <https://docs.typo3.org/permalink/t3tsref:typoscript-site-sets-site>`_)
it can contain the following files:

.. typo3:file:: constants.typoscript
:name: site-constants-typoscript
:scope: site
:composerPath: /config/sites/my-site/
:classicPath: /typo3conf/sites/my-site/
:regex: /^.*(config|typo3conf)\/sites\/[\w-]+\/constants\.typoscript$/
:shortDescription: Contains the TypoScript constants of a site

Contains the TypoScript constants of a site.

.. typo3:file:: setup.typoscript
:name: site-setup-typoscript
:scope: site
:composerPath: /config/sites/my-site/
:classicPath: /typo3conf/sites/my-site/
:regex: /^.*(config|typo3conf)\/sites\/[\w-]+\/setup\.typoscript$/
:shortDescription: Contains the TypoScript setup of a site

Contains the TypoScript setup of a site.

.. _site-folder-page-tsconfig:

Page TSconfig in the site folder
================================

.. typo3:file:: page.tsconfig
:name: site-page-typoscript
:scope: site
:composerPath: /config/sites/my-site/
:classicPath: /typo3conf/sites/my-site/
:regex: /^.*(config|typo3conf)\/sites\/[\w-]+\/page\.tsconfig$/
:shortDescription: Page TSconfig in this file is automatically loaded within the site scope

Page TSconfig in this file is automatically loaded within the site scope.
See also `Page TSconfig on site level <https://docs.typo3.org/permalink/t3tsref:include-static-page-tsconfig-per-site>`_.
4 changes: 2 additions & 2 deletions Documentation/ApiOverview/SiteHandling/Basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ Site configuration storage

When creating a new site configuration, a folder is created in the file system,
located at :file:`<project-root>/config/sites/<identifier>/`. The site
configuration is stored in a file called :file:`config.yaml`.
configuration is stored in a file called :file:`config.yaml <site-config-yaml>`.

.. note::
If you are using a legacy installation, the location is
:file:`typo3conf/sites/`.
:file:`typo3conf/sites/config.yaml`.

.. tip::
Add this folder to your version control system.
Expand Down

0 comments on commit fbbe005

Please sign in to comment.