Skip to content

Commit 125fcf2

Browse files
[Backport 13.4] [TASK] Document the GitLab template (#725)
* [TASK] Document the GitLab template Creat a chapter for project templates and move the introduction package there as well. releases: main, 13.4 * Update Documentation/ProjectTemplates/GitLabTemplate/Index.rst --------- Co-authored-by: lina.wolf <[email protected]> Co-authored-by: Lina Wolf <[email protected]>
1 parent 344ad08 commit 125fcf2

File tree

9 files changed

+187
-13
lines changed

9 files changed

+187
-13
lines changed

Documentation/FirstProject/Index.rst

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
First project setup
88
===================
99

10-
In this chapter you will:
10+
This chapter demonstrates how to create your first small project in an empty
11+
`TYPO3 Installation <https://docs.typo3.org/permalink/t3start:installation-index>`_.
1112

12-
* create a new site and set up its basic structure
13-
* create and integrate a custom site package
13+
Instead of following this chapter you can use a
14+
`Project template for a quick start <https://docs.typo3.org/permalink/t3start:project-templates>`_.
1415

1516
.. card-grid::
1617
:columns: 1
@@ -19,15 +20,6 @@ In this chapter you will:
1920
:class: pb-4
2021
:card-height: 100
2122

22-
.. card:: The "Introduction Package"
23-
24-
The "Introduction Package" is a great place to start if you are looking
25-
to test drive TYPO3 and see a prebuilt site that contains
26-
a range of example page templates and content.
27-
28-
.. card-footer:: :ref:`Set up a prebuild site <introductionpackage_index>`
29-
:button-style: btn btn-secondary stretched-link
30-
3123
.. card:: :ref:`Root page <create-root-page>`
3224

3325
Learn how to create the first page, the so called root page.
@@ -62,7 +54,6 @@ In this chapter you will:
6254
:hidden:
6355
:titlesonly:
6456

65-
IntroductionPackage/Index
6657
CreateRootPage
6758
SiteManagement/Index
6859
Settings

Documentation/Index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ system and detailed information on how to install TYPO3.
9494
Concepts/Index
9595
Installation/Index
9696
FirstProject/Index
97+
ProjectTemplates/Index
9798
Administration/Index
9899
Troubleshooting/Index
99100
Extensions/Index
Loading
Loading
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
:navigation-title: GitLab template
2+
3+
.. include:: /Includes.rst.txt
4+
.. _gitlab-template:
5+
6+
==========================================================
7+
Creating a TYPO3 project from the official GitLab template
8+
==========================================================
9+
10+
.. admonition:: Prerequisites
11+
12+
* Knowledge about Git
13+
* A GitLab account or self-hosted GitLab
14+
* Planning to do deployment
15+
* DDEV and Git installed locally
16+
17+
.. _gitlab-template-create:
18+
19+
Create from template
20+
====================
21+
22+
Go to page `GitLab - New from template <https://gitlab.com/projects/new#create_from_template>`_
23+
or to path `/new#create_from_template` on your self-hosted GitLab. And chose
24+
:guilabel:`TYPO3 Distribution` from the list:
25+
26+
.. figure:: UseTemplate.png
27+
:alt: The "TYPO3 Distribution" entry on the "Create from template" page on GitLab.
28+
29+
Click on "Use template"
30+
31+
.. _gitlab-template-create-details:
32+
33+
Fill in project details
34+
=======================
35+
36+
.. figure:: ProjectDetails.png
37+
:alt: Detail page when creating a project from a template in GitLab
38+
39+
Fill in the details
40+
41+
.. _gitlab-template-clone:
42+
43+
Clone the project
44+
=================
45+
46+
Clone the project to your local machine. You can download the SSH link from
47+
the :guilabel:`Code` dropdown:
48+
49+
.. figure:: GitClone.png
50+
:alt: Screenshot demonstration the location of the Code button where you can copy the Clone with SSH link
51+
52+
Copy the "Clone with SSH" link
53+
54+
Then clone the repository:
55+
56+
.. code-block:: bash
57+
58+
git clone [email protected]:linawolf/getting-started-with-the-gitlab-template.git
59+
60+
.. note::
61+
You need an `SSH key (GitLab docu) <https://docs.gitlab.com/user/ssh/>` to
62+
do this.
63+
64+
.. _gitlab-template-setup:
65+
66+
Start DDEV and setup TYPO3
67+
==========================
68+
69+
You can start and setup the project locally in DDEV using the built-in command:
70+
71+
.. code-block:: bash
72+
73+
ddev typo3-init
74+
75+
See also file :file:`Readme.md` in the root of your project.
76+
77+
78+
This step automatically creates several files that should be added to git:
79+
80+
.. code-block:: bash
81+
82+
$ git status
83+
On branch main
84+
Your branch is up to date with 'origin/main'.
85+
86+
Untracked files:
87+
(use "git add <file>..." to include in what will be committed)
88+
composer.lock
89+
config/sites/
90+
package-lock.json
91+
92+
nothing added to commit but untracked files present (use "git add" to track)
93+
94+
$ git add .
95+
96+
:file:`composer.lock`
97+
This file contains the information which exact versions of PHP packages
98+
are installed.
99+
:file:`package-lock.json`
100+
This file contains the information which exact versions of npm packages
101+
are installed.
102+
:file:`config/sites/`
103+
Contains configuration and settings of the site that was created during
104+
setup.
105+
106+
.. _gitlab-template-login:
107+
108+
Log into the TYPO3 backend
109+
==========================
110+
111+
If allowed by your system the TYPO3 backend login will be automatically opened
112+
in a browser. Otherwise you can open a browser of your choice with the
113+
link displayed in the console.
114+
115+
A default user has been created. Username and password are displayed in your
116+
console.
117+
118+
.. figure:: Backend.png
119+
:alt: TYPO3 Backend of a project created with the GitLab Template
120+
121+
Once logged in, you can preview a page and see it rendered with a basic theme.
122+
123+
.. _gitlab-template-directory:
124+
125+
Directory structure of the project
126+
==================================
127+
128+
.. directory-tree::
129+
130+
* :path:`.ddev` DDEV configuration
131+
* :path:`assets` assets for a basic theme that will be built by vite
132+
* :path:`config` system and site configuration created during setup
133+
* :path:`node_modules` Managed by npm and vite
134+
* :path:`packages`
135+
136+
* :path:`site-distribution` basic site package that you can adjust
137+
138+
* :path:`public` webroot of the server
139+
* :path:`var` you can find the logs and other temporary files here
140+
* :path:`vendor` all packages are installed here
141+
* :file:`composer.json` constraints for
142+
* :file:`composer.lock` contains the information which exact versions
143+
of PHP packages are installed.
144+
* :file:`package.json` constraints for frontend libraries
145+
* :file:`package-lock.json` contains the information which exact versions
146+
of npm packages are installed.
147+
* :file:`vite.config.js` predefined vite configuration
148+
Loading
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
:navigation-title: Project templates
2+
3+
.. include:: /Includes.rst.txt
4+
.. _project-templates:
5+
6+
===================================
7+
Project templates for a quick start
8+
===================================
9+
10+
.. toctree::
11+
:hidden:
12+
:titlesonly:
13+
14+
IntroductionPackage/Index
15+
GitLabTemplate/Index
16+
17+
.. card-grid::
18+
:columns: 1
19+
:columns-md: 2
20+
:gap: 4
21+
:class: pb-4
22+
:card-height: 100
23+
24+
.. card:: `Introduction Package <https://docs.typo3.org/permalink/t3start:introductionpackage-index>`_
25+
26+
Creates a site with some predefined content based on the extension
27+
:composer:`bk2k/bootstrap-package` for theming.
28+
29+
.. card:: :ref:`Official GitLab template <gitlab-template>`
30+
31+
Creates a project based on DDEV and Composer for you with a basic site
32+
package, vite and some example data. The project is prepared to be kept
33+
under `Version control <https://docs.typo3.org/permalink/t3coreapi:version-control>`_
34+
and for deployment with `Deployer <https://docs.typo3.org/permalink/t3coreapi:deployment-deployer>`_.

0 commit comments

Comments
 (0)