-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Add init command to setup documentation (#850)
First version of an init command that will setup the Documentation directory. This includes a very basic guides.xml. Therefor the user has to answer a number of questions that will fill in the defaults. --------- Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com> Co-authored-by: Garvin Hicking <blog@garv.in> Co-authored-by: lina.wolf <lwolf@w-commerce.de> Co-authored-by: Stefan Frömken <123929835+sfroemkenjw@users.noreply.github.com>
- Loading branch information
1 parent
9aa3bb1
commit 01ef2cf
Showing
19 changed files
with
625 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
packages/typo3-guides-cli/resources/templates/Index.md.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# {{ projectName }} | ||
|
||
{{ description | default('No description provided.') }} | ||
|
||
## Installation | ||
|
||
Install the extension via Composer: | ||
|
||
``` | ||
composer req {{ composerName }} | ||
``` | ||
|
||
{% if projectHomePage %} | ||
Or download the extension from {{ projectHomePage }} and install it in | ||
the Extension Manager. | ||
{% endif %} | ||
|
||
See also [Installing extensions, TYPO3 Getting started](https://docs.typo3.org/permalink/t3start:installing-extensions) | ||
|
||
## Configuration | ||
|
||
|
||
{% if siteSet %} | ||
|
||
### Include the site set | ||
|
||
This extension comes with a site set called `{{ siteSet }}`. To use it include | ||
this set in your site configuration via | ||
|
||
``` | ||
base: 'https://example.com/' | ||
rootPageId: 1 | ||
dependencies: | ||
- {{ siteSet }} | ||
``` | ||
|
||
See also: `TYPO3 Explained, Using a site set as dependency in a site <https://docs.typo3.org/permalink/t3coreapi:site-sets-usage>`_. | ||
{% else %} | ||
Describe how to configure the extension. | ||
{% endif %} | ||
|
||
## Report issues | ||
|
||
{% if issuesUrl %} | ||
You can report issues at {{ issuesUrl }}. | ||
{% else %} | ||
Explain, how to report issues. | ||
{% endif %} |
34 changes: 34 additions & 0 deletions
34
packages/typo3-guides-cli/resources/templates/guides.xml.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<guides | ||
xmlns="https://www.phpdoc.org/guides" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://www.phpdoc.org/guides vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd" | ||
input-format="{{ format }}" | ||
{% if useMd -%} | ||
index-name="Index" | ||
automatic-menu="true" | ||
{% endif -%} | ||
> | ||
<project | ||
title="{{ projectName }}" | ||
copyright="The contributors" | ||
/> | ||
<extension | ||
class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension" | ||
{% if editOnGitHub -%} | ||
edit-on-github="{{ editOnGitHub }}" | ||
edit-on-github-branch="main" | ||
{% endif -%} | ||
interlink-shortcode="{{ composerName }}" | ||
{% if projectHomePage -%} | ||
project-home="{{ projectHomePage }}" | ||
{% endif -%} | ||
{% if issuesUrl -%} | ||
project-issues="{{ issuesUrl }}" | ||
{% endif -%} | ||
{% if repositoryUrl -%} | ||
project-repository="{{ repositoryUrl }}" | ||
{% endif -%} | ||
typo3-core-preferred="{{ typo3CoreVersion }}" | ||
/> | ||
</guides> |
42 changes: 42 additions & 0 deletions
42
packages/typo3-guides-cli/resources/templates/rst/Configuration.rst.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
:navigation-title: Configuration | ||
.. _configuration: | ||
|
||
============= | ||
Configuration | ||
============= | ||
|
||
{% if siteSet %} | ||
.. _site-set: | ||
|
||
Include the site set | ||
==================== | ||
|
||
This extension comes with a site set called `{{ siteSet }}`. To use it include | ||
this set in your site configuration via | ||
|
||
.. code-block:: diff | ||
:caption: config/sites/my-site/config.yaml (diff) | ||
|
||
base: 'https://example.com/' | ||
rootPageId: 1 | ||
+dependencies: | ||
+ - {{ siteSet }} | ||
|
||
See also: `TYPO3 Explained, Using a site set as dependency in a site <https://docs.typo3.org/permalink/t3coreapi:site-sets-usage>`_. | ||
|
||
{% if siteSetDefinition %} | ||
.. _site-set-settings: | ||
|
||
Use the settings to configure the extension | ||
------------------------------------------- | ||
|
||
.. typo3:site-set-settings:: PROJECT:/ | ||
:name: main-set | ||
:type: | ||
:Label: max=30 | ||
:default: max=10 | ||
{% endif %} | ||
|
||
{% else %} | ||
Describe how to configure the extension. | ||
{% endif %} |
29 changes: 29 additions & 0 deletions
29
packages/typo3-guides-cli/resources/templates/rst/Faq.rst.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
:navigation-title: FAQ | ||
|
||
.. _faq: | ||
|
||
================================ | ||
Frequently Asked Questions (FAQ) | ||
================================ | ||
|
||
.. accordion:: | ||
:name: faq | ||
|
||
.. accordion-item:: How can I install this extension? | ||
:name: installation | ||
:header-level: 2 | ||
:show: | ||
|
||
See chapter :ref:`installation`. | ||
|
||
.. accordion-item:: How to can I include the TypoScript? | ||
:name: configuration | ||
:header-level: 2 | ||
|
||
See chapter :ref:`configuration`. | ||
|
||
.. accordion-item:: Where to get help? | ||
:name: help | ||
:header-level: 2 | ||
|
||
See chapter :ref:`help`. |
22 changes: 22 additions & 0 deletions
22
packages/typo3-guides-cli/resources/templates/rst/GetHelp.rst.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
:navigation-title: Get Help | ||
|
||
.. _help: | ||
|
||
================= | ||
Where to get help | ||
================= | ||
|
||
You can get help in the TYPO3 Slack https://typo3.org/community/meet/chat-slack, | ||
Ask a question in the official TYPO3 forum, https://talk.typo3.org/c/typo3-questions/19 | ||
or contact the extension author. | ||
|
||
.. _report-issues: | ||
|
||
Report Issues | ||
============= | ||
|
||
{% if issuesUrl %} | ||
You can report issues at `{{ issuesUrl }} <{{ issuesUrl }}>`_. | ||
{% else %} | ||
No issue tracker is currently available. | ||
{% endif %} |
47 changes: 47 additions & 0 deletions
47
packages/typo3-guides-cli/resources/templates/rst/Index.rst.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. _start: | ||
|
||
{{ '='|repeat(projectName|length) }} | ||
{{ projectName }} | ||
{{ '='|repeat(projectName|length) }} | ||
|
||
{{ description | default('No description provided.') }} | ||
|
||
.. toctree:: | ||
:glob: | ||
:titlesonly: | ||
:hidden: | ||
|
||
*/Index | ||
Installation | ||
Configuration | ||
GetHelp | ||
* | ||
|
||
.. card-grid:: | ||
:columns: 1 | ||
:columns-md: 2 | ||
:gap: 4 | ||
:class: pb-4 | ||
:card-height: 100 | ||
|
||
.. card:: :ref:`Installation <installation>` | ||
|
||
Explains how to install this extension in Composer-based and Classic | ||
TYPO3 installations. | ||
|
||
.. card:: :ref:`Configuration <configuration>` | ||
|
||
{% if siteSet %} | ||
Learn how to include the site set `{{ siteSet }}` and how to use settings | ||
to configure this extension. | ||
{% else %} | ||
Learn how to configure this extension. | ||
{% endif %} | ||
|
||
.. card:: :ref:`Frequently Asked Questions (FAQ) <faq>` | ||
|
||
These questions have been frequently asked. | ||
|
||
.. card:: :ref:`How to get help <help>` | ||
|
||
Learn where to get help and how to report issues you found. |
33 changes: 33 additions & 0 deletions
33
packages/typo3-guides-cli/resources/templates/rst/Installation.rst.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
:navigation-title: Installation | ||
|
||
.. _installation: | ||
|
||
============ | ||
Installation | ||
============ | ||
|
||
.. _installation-composer: | ||
|
||
Install {{ projectName }} with Composer | ||
======================================= | ||
|
||
Install the extension via Composer: | ||
|
||
.. code-block:: bash | ||
|
||
composer req {{ composerName }} | ||
|
||
See also `Installing extensions, TYPO3 Getting started <https://docs.typo3.org/permalink/t3start:installing-extensions>`_. | ||
|
||
.. _installation-classic: | ||
|
||
Install {{ projectName }} in Classic Mode | ||
========================================= | ||
|
||
{% if projectHomePage %} | ||
Or download the extension from `{{ projectHomePage }} <{{ projectHomePage }}>`_ and install it in | ||
the Extension Manager. | ||
{% else %} | ||
Or download the extension from the `TER <https://extensions.typo3.org/>`_ and install it in | ||
the Extension Manager. | ||
{% endif %} |
Oops, something went wrong.