Skip to content

Commit 51dd7d2

Browse files
jaapiolinawolf
authored andcommitted
[DOCS] Restructure docs
1 parent 59a1335 commit 51dd7d2

File tree

8 files changed

+103
-68
lines changed

8 files changed

+103
-68
lines changed

docs/architecture.rst

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
Architecture
33
============
44

5-
The project is built around the core library that is called ``guides``. This library
6-
contains all core components of the project. Like the different layers :ref:`parser-component`,
7-
:ref:`compiler-component` and :ref:`renderer-component` and includes the basic
8-
Nodes and templates to create output.
5+
The project is build around the core library that is called ``guides``. This library
6+
contains all core components of the project. Like the different layers :doc:`parser`,
7+
:doc:`compiler` and :doc:`render` and includes the basic Nodes and templates to create
8+
output.
99

10-
Installation of the core library can be done using ``composer``:
10+
Installation of the core library can be done using ``composer``::
1111

12-
.. code-block:: bash
13-
14-
composer require phpdocumentor/guides
12+
.. code:: bash
13+
composer require phpdocumentor/guides
1514
1615
The other components are using the core library and extend it with additional
1716
functionality. For example the ``guides-markdown`` component adds support for
@@ -25,27 +24,3 @@ all components.
2524
The ``guides``, ``guides-markdown`` and ``guides-restructuredtext`` are seen as the main
2625
libaries of the project. The other components are optional and can be used to extend the
2726
functionality of the main libraries for specific use cases.
28-
29-
Application flow
30-
================
31-
32-
Processing documents is done in a few steps.
33-
34-
#. :php:class:`Parsing <\phpDocumentor\Guides\Parser>` The first step is to parse the document.
35-
This is done by the :ref:`parser-component`. The
36-
parser component will parse the document and create a tree of nodes. Each node
37-
represents a part of the document. For example a paragraph, a list or a table.
38-
#. :php:class:`Compiling <\phpDocumentor\Guides\Compiler\Compiler>` The second step is to compile the tree of nodes.
39-
This is done by the :ref:`compiler-component`
40-
component. During the compilation, modifications can be made to the tree of nodes. For
41-
example the compiler can add a table of contents to the tree of nodes.
42-
43-
#. :php:class:`Rendering <\phpDocumentor\Guides\Renderer\BaseTypeRenderer>`
44-
The third step is to render the tree of nodes. This is done by the :ref:`renderer-component`
45-
component. The render component will render the tree of nodes to a specific output
46-
format. By default twig templates are used to render nodes to HTML. But you can
47-
create your own templates to render nodes to other formats. Or implement your own
48-
renderer to use a different template engine.
49-
50-
.. uml:: _uml/application-flow.puml
51-
:caption: Application flow

docs/cli/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The cli tool is able to read configuration from a ``guides.xml`` file.
88
You should put this file in the current working directory where you execute
99
the tool. Generally speaking, this is the root of your project.
1010

11-
Using a configuration file allows you to set project-specific settings and
11+
Using a configuration file allows you to set project specific settings and
1212
keep them under version control. Not all options available in the configuration
1313
are available on the command line. Such as the :ref:`extension configuration`.
1414

docs/cli/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Create your first documentation
1212
===============================
1313

1414
After :doc:`/installation` you can directly start to create your first documentation.
15-
to do this, create a new directory named ``docs`` and create a file called ``index.rst`` in it.
15+
to do this create a new directory named ``docs`` and create a file called ``index.rst`` in it.
1616

1717
.. code-block:: rst
1818
@@ -49,6 +49,6 @@ to learn more about the configuration.
4949
Extending
5050
=========
5151

52-
Like any other component in this repository, the commandline tool can be extended. This can
53-
be done using an extension class, and referencing this class in the configuration file, like
52+
Like any other component in this repository the commandline tool can be extended. This can
53+
be done using an extension class. And reference this class in the configuration file. Like
5454
shown for in the :ref:`.extension-configuration` section.

docs/developers/extensions/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
.. include:: /include.rst.txt
22

3-
.. _developer-extension:
4-
53
==========
64
Extensions
75
==========

docs/developers/index.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,5 @@ application to render ReStructuredText or Markdown documents. Or want to integra
88
it in some other way that is not possible with the ``guides`` command line tool.
99

1010
.. toctree::
11-
:maxdepth: 1
12-
:titlesonly:
1311

1412
extensions/index
15-
compiler
16-
directive

docs/index.rst

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ Report issues
1818
Latest public documentation
1919
|composer_support_docs|
2020

21-
If you are building your own application you can install the libraries using `Composer <https://getcomposer.org/>`__::
21+
This project contains a framework for rendering documentation. It provides a simple commandline tool to render
22+
your documentation from `reStructuredText Markup <https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html>`__ and
23+
`Markdown <https://daringfireball.net/projects/markdown/>`__. to HTML or LaTeX. And can be extended to support other
24+
formats.
2225

23-
.. code:: bash
26+
Besides the commandline tool it also provides a number of libraries that can be used to build your own application
27+
to render the supported formats. To any format you want. On these pages is explained how to use the commandline tool
28+
and how to use the libraries.
2429

25-
composer require phpdocumentor/guides
26-
27-
This will install all basic libraries needed to get started to get started.
28-
All libraries come with support for `Symfony dependency injection <https://symfony.com/doc/current/components/dependency_injection.html>`__.
29-
This will help you to get started with the libraries in symfony applications.
30-
31-
Read more about writing your own application in the :doc:`developers` section.
30+
If you are looking for a complete solution to create a documentation website then you may want to look at
31+
`PHPDocumentor <https://phpdoc.org/>`__.
3232

3333
.. tip::
3434

@@ -44,8 +44,9 @@ Read more about writing your own application in the :doc:`developers` section.
4444
.. toctree::
4545
:hidden:
4646

47-
usage
48-
configuration
49-
extension/index
50-
rst-reference/index
47+
installation
48+
cli/index
49+
developers/index
50+
architecture
51+
reference/index
5152
about

docs/installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ This will install the commandline tool in the vendor/bin directory. You can then
2727
2828
vendor/bin/guides ./docs
2929
30-
The commandline tool is built for extension, if you do not have special needs this is the
30+
The commandline tool is build for extension, if you do not have special needs this is the
3131
recommended way to get started. You can learn more about how to extend the commandline tool in the :doc:`/cli/index` section.
3232

3333
Library (advanced)
34-
==================
34+
===============================
3535

3636
.. _library:
3737

Lines changed: 76 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,86 @@
11
.. include:: /include.rst.txt
22

3-
.. _directive-reference:
4-
53
===========
64
Admonitions
75
===========
86

9-
Admonitions are blocks of text that are rendered in a special way to draw attention to them. They are often used to
10-
provide additional information to the reader about the content that is being discussed.
7+
The following directives are called "admonitions". You
8+
can use them to point out additional or important
9+
information.
10+
11+
Examples
12+
========
13+
14+
.. index:: reST directives; seealso
15+
16+
See also
17+
--------
18+
19+
.. code-block:: rest
20+
21+
.. seealso::
22+
`Admonitions <http://docutils.sourceforge.net/0.7/docs/ref/rst/directives.html#admonitions>`__
23+
24+
.. seealso::
25+
`Admonitions <http://docutils.sourceforge.net/0.7/docs/ref/rst/directives.html#admonitions>`__
26+
27+
28+
.. index:: reST directives; note
29+
30+
Note
31+
----
32+
33+
.. code-block:: rest
34+
35+
.. note::
36+
A note
37+
38+
.. note::
39+
A note
40+
41+
42+
.. index:: reST directives; tip
43+
44+
Tip
45+
---
46+
47+
.. code-block:: rest
48+
49+
.. tip::
50+
A tip
51+
52+
.. tip::
53+
A tip
54+
55+
You may also use the admonition **hint**, but this is very similar
56+
and **tip** is more commonly used in the documentation.
57+
58+
.. index:: reST directives; warning
59+
60+
Warning
61+
-------
62+
63+
.. code-block:: rest
64+
65+
.. warning::
66+
Some text pointing out something that people should be warned about.
67+
68+
.. warning::
69+
Some text pointing out something that people should be warned about.
70+
71+
You may also use the admonitions **caution** or even **danger** if the
72+
severity of the warning must be stressed.
73+
74+
75+
.. index:: reST directives; attention
1176

12-
.. index:: reST directives; seealso
77+
Attention
78+
---------
1379

14-
.. phpdoc:class-list:: [?(@.inheritedElement == "\phpDocumentor\Guides\RestructuredText\Directives\AbstractAdmonitionDirective")]
80+
.. code-block:: rest
1581
16-
.. phpdoc:name::
17-
:title: true
18-
:level: 2
82+
.. attention::
83+
A attention
1984
20-
.. phpdoc:summary::
21-
.. phpdoc:description::
85+
.. attention::
86+
A attention

0 commit comments

Comments
 (0)