From 0668fb9342dbe9e9bb9e53ca716f2a6ea62febd2 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Wed, 1 Nov 2023 10:50:43 +0100 Subject: [PATCH 1/4] [TASK] Add skipped integration test for MD All these examples are taken from real life examples --- .../tests/markdown/html-md/expected/index.html | 15 +++++++++++++++ .../tests/markdown/html-md/input/guides.xml | 8 ++++++++ .../tests/markdown/html-md/input/index.md | 8 ++++++++ .../Integration/tests/markdown/html-md/input/skip | 1 + .../image-empty-alt-md/expected/index.html | 13 +++++++++++++ .../markdown/image-empty-alt-md/input/guides.xml | 8 ++++++++ .../markdown/image-empty-alt-md/input/index.md | 3 +++ .../tests/markdown/image-empty-alt-md/input/skip | 1 + .../markdown/linked-image-md/expected/index.html | 12 ++++++++++++ .../markdown/linked-image-md/input/guides.xml | 8 ++++++++ .../tests/markdown/linked-image-md/input/index.md | 5 +++++ .../tests/markdown/linked-image-md/input/skip | 1 + 12 files changed, 83 insertions(+) create mode 100644 tests/Integration/tests/markdown/html-md/expected/index.html create mode 100644 tests/Integration/tests/markdown/html-md/input/guides.xml create mode 100644 tests/Integration/tests/markdown/html-md/input/index.md create mode 100644 tests/Integration/tests/markdown/html-md/input/skip create mode 100644 tests/Integration/tests/markdown/image-empty-alt-md/expected/index.html create mode 100644 tests/Integration/tests/markdown/image-empty-alt-md/input/guides.xml create mode 100644 tests/Integration/tests/markdown/image-empty-alt-md/input/index.md create mode 100644 tests/Integration/tests/markdown/image-empty-alt-md/input/skip create mode 100644 tests/Integration/tests/markdown/linked-image-md/expected/index.html create mode 100644 tests/Integration/tests/markdown/linked-image-md/input/guides.xml create mode 100644 tests/Integration/tests/markdown/linked-image-md/input/index.md create mode 100644 tests/Integration/tests/markdown/linked-image-md/input/skip diff --git a/tests/Integration/tests/markdown/html-md/expected/index.html b/tests/Integration/tests/markdown/html-md/expected/index.html new file mode 100644 index 000000000..cfa0b2e2c --- /dev/null +++ b/tests/Integration/tests/markdown/html-md/expected/index.html @@ -0,0 +1,15 @@ + + + + Markdown with html - Project Title + + + +

Markdown with html

+ +

In files of text, where words take flight, + Markdown weaves its magic, bold and bright. + Hashes and stars, a simple code, + A poet's playground, where stories unfold.

+ + diff --git a/tests/Integration/tests/markdown/html-md/input/guides.xml b/tests/Integration/tests/markdown/html-md/input/guides.xml new file mode 100644 index 000000000..2ef460029 --- /dev/null +++ b/tests/Integration/tests/markdown/html-md/input/guides.xml @@ -0,0 +1,8 @@ + + + + diff --git a/tests/Integration/tests/markdown/html-md/input/index.md b/tests/Integration/tests/markdown/html-md/input/index.md new file mode 100644 index 000000000..347853b0e --- /dev/null +++ b/tests/Integration/tests/markdown/html-md/input/index.md @@ -0,0 +1,8 @@ +# Markdown with html + +
+In files of text, where words take flight, +Markdown weaves its magic, bold and bright. +Hashes and stars, a simple code, +A poet's playground, where stories unfold. +
\ No newline at end of file diff --git a/tests/Integration/tests/markdown/html-md/input/skip b/tests/Integration/tests/markdown/html-md/input/skip new file mode 100644 index 000000000..d23e35203 --- /dev/null +++ b/tests/Integration/tests/markdown/html-md/input/skip @@ -0,0 +1 @@ +HTML Tags are not allowed - but they should fail gracefully \ No newline at end of file diff --git a/tests/Integration/tests/markdown/image-empty-alt-md/expected/index.html b/tests/Integration/tests/markdown/image-empty-alt-md/expected/index.html new file mode 100644 index 000000000..018f82157 --- /dev/null +++ b/tests/Integration/tests/markdown/image-empty-alt-md/expected/index.html @@ -0,0 +1,13 @@ + + + + Markdown with links - Project Title + + + +

Markdown with links

+ +

This is a Markdown document with some basic formatting.

+

See also: Link Text

+ + diff --git a/tests/Integration/tests/markdown/image-empty-alt-md/input/guides.xml b/tests/Integration/tests/markdown/image-empty-alt-md/input/guides.xml new file mode 100644 index 000000000..2ef460029 --- /dev/null +++ b/tests/Integration/tests/markdown/image-empty-alt-md/input/guides.xml @@ -0,0 +1,8 @@ + + + + diff --git a/tests/Integration/tests/markdown/image-empty-alt-md/input/index.md b/tests/Integration/tests/markdown/image-empty-alt-md/input/index.md new file mode 100644 index 000000000..d575a37c3 --- /dev/null +++ b/tests/Integration/tests/markdown/image-empty-alt-md/input/index.md @@ -0,0 +1,3 @@ +# additional_reports + +![](https://raw.githubusercontent.com/Apen/additional_reports/master/Resources/Public/Images/middlewares.png) diff --git a/tests/Integration/tests/markdown/image-empty-alt-md/input/skip b/tests/Integration/tests/markdown/image-empty-alt-md/input/skip new file mode 100644 index 000000000..000dd1834 --- /dev/null +++ b/tests/Integration/tests/markdown/image-empty-alt-md/input/skip @@ -0,0 +1 @@ +Images with empty alt text cause errors \ No newline at end of file diff --git a/tests/Integration/tests/markdown/linked-image-md/expected/index.html b/tests/Integration/tests/markdown/linked-image-md/expected/index.html new file mode 100644 index 000000000..ecda92859 --- /dev/null +++ b/tests/Integration/tests/markdown/linked-image-md/expected/index.html @@ -0,0 +1,12 @@ + + + + Markdown with linked images - Project Title + + + +

Markdown with linked images

+ +

+ + diff --git a/tests/Integration/tests/markdown/linked-image-md/input/guides.xml b/tests/Integration/tests/markdown/linked-image-md/input/guides.xml new file mode 100644 index 000000000..2ef460029 --- /dev/null +++ b/tests/Integration/tests/markdown/linked-image-md/input/guides.xml @@ -0,0 +1,8 @@ + + + + diff --git a/tests/Integration/tests/markdown/linked-image-md/input/index.md b/tests/Integration/tests/markdown/linked-image-md/input/index.md new file mode 100644 index 000000000..60f0ae0da --- /dev/null +++ b/tests/Integration/tests/markdown/linked-image-md/input/index.md @@ -0,0 +1,5 @@ +# Markdown with linked images + +[![Build Status](https://github.com/AOEpeople/TYPO3-Feature-Flag/workflows/CI/badge.svg?branch=main)](https://github.com/AOEpeople/TYPO3-Feature-Flag/actions) +[![Code Coverage](https://scrutinizer-ci.com/g/AOEpeople/TYPO3-Feature-Flag/badges/coverage.png?b=main)](https://scrutinizer-ci.com/g/AOEpeople/TYPO3-Feature-Flag/?branch=main) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/AOEpeople/TYPO3-Feature-Flag/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/AOEpeople/TYPO3-Feature-Flag/?branch=main) diff --git a/tests/Integration/tests/markdown/linked-image-md/input/skip b/tests/Integration/tests/markdown/linked-image-md/input/skip new file mode 100644 index 000000000..4e3e944ef --- /dev/null +++ b/tests/Integration/tests/markdown/linked-image-md/input/skip @@ -0,0 +1 @@ +Linked images are currently not supported \ No newline at end of file From a3b2ded2d35718c10f07866404520744c512d1e5 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Wed, 1 Nov 2023 11:42:59 +0100 Subject: [PATCH 2/4] [FEATURE] Fail direct HTML input gracefully by escaping HTML We cannot just pass through raw HTML for security reasons or because they might break the theme. --- .../resources/config/guides-markdown.php | 4 ++ .../src/Markdown/Parsers/HtmlParser.php | 42 +++++++++++++++++++ .../html-inline-md/expected/index.html | 12 ++++++ .../markdown/html-inline-md/input/guides.xml | 8 ++++ .../markdown/html-inline-md/input/index.md | 6 +++ .../markdown/html-md/expected/index.html | 10 +++-- .../html-md/expected/logs/warning.log | 1 + .../tests/markdown/html-md/input/skip | 1 - 8 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 packages/guides-markdown/src/Markdown/Parsers/HtmlParser.php create mode 100644 tests/Integration/tests/markdown/html-inline-md/expected/index.html create mode 100644 tests/Integration/tests/markdown/html-inline-md/input/guides.xml create mode 100644 tests/Integration/tests/markdown/html-inline-md/input/index.md create mode 100644 tests/Integration/tests/markdown/html-md/expected/logs/warning.log delete mode 100644 tests/Integration/tests/markdown/html-md/input/skip diff --git a/packages/guides-markdown/resources/config/guides-markdown.php b/packages/guides-markdown/resources/config/guides-markdown.php index 1acc881cf..be525679d 100644 --- a/packages/guides-markdown/resources/config/guides-markdown.php +++ b/packages/guides-markdown/resources/config/guides-markdown.php @@ -6,6 +6,7 @@ use phpDocumentor\Guides\Markdown\Parsers\BlockQuoteParser; use phpDocumentor\Guides\Markdown\Parsers\CodeBlockParser; use phpDocumentor\Guides\Markdown\Parsers\HeaderParser; +use phpDocumentor\Guides\Markdown\Parsers\HtmlParser; use phpDocumentor\Guides\Markdown\Parsers\InlineParsers\EmphasisParser; use phpDocumentor\Guides\Markdown\Parsers\InlineParsers\InlineCodeParser; use phpDocumentor\Guides\Markdown\Parsers\InlineParsers\InlineImageParser; @@ -36,6 +37,9 @@ ->arg('$subParsers', tagged_iterator('phpdoc.guides.markdown.parser.subParser')) ->tag('phpdoc.guides.markdown.parser.blockParser') ->tag('phpdoc.guides.markdown.parser.subParser') + ->set(HtmlParser::class) + ->tag('phpdoc.guides.markdown.parser.blockParser') + ->tag('phpdoc.guides.markdown.parser.subParser') ->set(ListBlockParser::class) ->tag('phpdoc.guides.markdown.parser.blockParser') ->tag('phpdoc.guides.markdown.parser.subParser') diff --git a/packages/guides-markdown/src/Markdown/Parsers/HtmlParser.php b/packages/guides-markdown/src/Markdown/Parsers/HtmlParser.php new file mode 100644 index 000000000..ec6101bd1 --- /dev/null +++ b/packages/guides-markdown/src/Markdown/Parsers/HtmlParser.php @@ -0,0 +1,42 @@ + */ +final class HtmlParser extends AbstractBlockParser +{ + public function __construct( + private readonly LoggerInterface $logger, + ) { + } + + public function parse(MarkupLanguageParser $parser, NodeWalker $walker, CommonMarkNode $current): ParagraphNode + { + assert($current instanceof HtmlBlock); + + $this->logger->warning('We do not support plain HTML for security reasons. Escaping all HTML '); + + $walker->next(); + + return new ParagraphNode([new InlineCompoundNode([new PlainTextInlineNode($current->getLiteral())])]); + } + + public function supports(NodeWalkerEvent $event): bool + { + return $event->isEntering() && $event->getNode() instanceof HtmlBlock; + } +} diff --git a/tests/Integration/tests/markdown/html-inline-md/expected/index.html b/tests/Integration/tests/markdown/html-inline-md/expected/index.html new file mode 100644 index 000000000..23fddfbd1 --- /dev/null +++ b/tests/Integration/tests/markdown/html-inline-md/expected/index.html @@ -0,0 +1,12 @@ + + + + Markdown with html - Project Title + + + +

Markdown with html

+ +

In files of text, where words take flight,Markdown weaves its magic, bold and bright.Hashes and stars, a simple code,A poet's playground, where stories unfold. <BR>

+ + diff --git a/tests/Integration/tests/markdown/html-inline-md/input/guides.xml b/tests/Integration/tests/markdown/html-inline-md/input/guides.xml new file mode 100644 index 000000000..2ef460029 --- /dev/null +++ b/tests/Integration/tests/markdown/html-inline-md/input/guides.xml @@ -0,0 +1,8 @@ + + + + diff --git a/tests/Integration/tests/markdown/html-inline-md/input/index.md b/tests/Integration/tests/markdown/html-inline-md/input/index.md new file mode 100644 index 000000000..d6fbb465b --- /dev/null +++ b/tests/Integration/tests/markdown/html-inline-md/input/index.md @@ -0,0 +1,6 @@ +# Markdown with html + +In files of text, where words take flight,
+Markdown weaves its magic, bold and bright.
+Hashes and stars, a simple code,
+A poet's playground, where stories unfold.
diff --git a/tests/Integration/tests/markdown/html-md/expected/index.html b/tests/Integration/tests/markdown/html-md/expected/index.html index cfa0b2e2c..6c87385e8 100644 --- a/tests/Integration/tests/markdown/html-md/expected/index.html +++ b/tests/Integration/tests/markdown/html-md/expected/index.html @@ -7,9 +7,11 @@

Markdown with html

-

In files of text, where words take flight, - Markdown weaves its magic, bold and bright. - Hashes and stars, a simple code, - A poet's playground, where stories unfold.

+

<div align="center"> +In files of text, where words take flight, +Markdown weaves its magic, bold and bright. +Hashes and stars, a simple code, +A poet's playground, where stories unfold. +</div>

diff --git a/tests/Integration/tests/markdown/html-md/expected/logs/warning.log b/tests/Integration/tests/markdown/html-md/expected/logs/warning.log new file mode 100644 index 000000000..526dcda63 --- /dev/null +++ b/tests/Integration/tests/markdown/html-md/expected/logs/warning.log @@ -0,0 +1 @@ +app.WARNING: We do not support plain HTML for security reasons. Escaping all HTML diff --git a/tests/Integration/tests/markdown/html-md/input/skip b/tests/Integration/tests/markdown/html-md/input/skip deleted file mode 100644 index d23e35203..000000000 --- a/tests/Integration/tests/markdown/html-md/input/skip +++ /dev/null @@ -1 +0,0 @@ -HTML Tags are not allowed - but they should fail gracefully \ No newline at end of file From 721a8f20daf774b1c71c1da7d33a594c6531c5ce Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Wed, 1 Nov 2023 12:01:17 +0100 Subject: [PATCH 3/4] [FEATURE] Handle images without alt tags Issue a warning for accessibility reasons but let them output --- .../AbstractInlineTextDecoratorParser.php | 5 +++++ .../Parsers/InlineParsers/InlineImageParser.php | 13 ++++++++++++- .../markdown/image-empty-alt-md/expected/index.html | 8 ++++---- .../image-empty-alt-md/expected/logs/warning.log | 1 + .../markdown/image-empty-alt-md/input/index.md | 6 ++++-- .../tests/markdown/image-empty-alt-md/input/skip | 1 - 6 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 tests/Integration/tests/markdown/image-empty-alt-md/expected/logs/warning.log delete mode 100644 tests/Integration/tests/markdown/image-empty-alt-md/input/skip diff --git a/packages/guides-markdown/src/Markdown/Parsers/InlineParsers/AbstractInlineTextDecoratorParser.php b/packages/guides-markdown/src/Markdown/Parsers/InlineParsers/AbstractInlineTextDecoratorParser.php index 30c426ebf..c240ca1a0 100644 --- a/packages/guides-markdown/src/Markdown/Parsers/InlineParsers/AbstractInlineTextDecoratorParser.php +++ b/packages/guides-markdown/src/Markdown/Parsers/InlineParsers/AbstractInlineTextDecoratorParser.php @@ -35,6 +35,11 @@ public function parse(MarkupLanguageParser $parser, NodeWalker $walker, CommonMa { $content = []; + if ($current->firstChild() === null) { + // Handle inline nodes without content + return $this->createInlineNode($current, null); + } + while ($event = $walker->next()) { $commonMarkNode = $event->getNode(); diff --git a/packages/guides-markdown/src/Markdown/Parsers/InlineParsers/InlineImageParser.php b/packages/guides-markdown/src/Markdown/Parsers/InlineParsers/InlineImageParser.php index e8e304fc3..096306f7a 100644 --- a/packages/guides-markdown/src/Markdown/Parsers/InlineParsers/InlineImageParser.php +++ b/packages/guides-markdown/src/Markdown/Parsers/InlineParsers/InlineImageParser.php @@ -11,6 +11,7 @@ use Psr\Log\LoggerInterface; use function assert; +use function sprintf; /** @extends AbstractInlineTextDecoratorParser */ final class InlineImageParser extends AbstractInlineTextDecoratorParser @@ -18,7 +19,7 @@ final class InlineImageParser extends AbstractInlineTextDecoratorParser /** @param iterable> $inlineParsers */ public function __construct( iterable $inlineParsers, - LoggerInterface $logger, + private readonly LoggerInterface $logger, ) { parent::__construct($inlineParsers, $logger); } @@ -32,6 +33,16 @@ protected function createInlineNode(CommonMarkNode $commonMarkNode, string|null { assert($commonMarkNode instanceof Image); + if ($content === null) { + $this->logger->warning( + sprintf( + 'Image %s does not have an alternative text. Add an alternative text like this: ![Image description](%s)', + $commonMarkNode->getUrl(), + $commonMarkNode->getUrl(), + ), + ); + } + return new ImageInlineNode($commonMarkNode->getUrl(), $content ?? ''); } diff --git a/tests/Integration/tests/markdown/image-empty-alt-md/expected/index.html b/tests/Integration/tests/markdown/image-empty-alt-md/expected/index.html index 018f82157..8bafbe8ea 100644 --- a/tests/Integration/tests/markdown/image-empty-alt-md/expected/index.html +++ b/tests/Integration/tests/markdown/image-empty-alt-md/expected/index.html @@ -1,13 +1,13 @@ - Markdown with links - Project Title + Images with and without alt text - Project Title -

Markdown with links

+

Images with and without alt text

-

This is a Markdown document with some basic formatting.

-

See also: Link Text

+

with alt Text

+

diff --git a/tests/Integration/tests/markdown/image-empty-alt-md/expected/logs/warning.log b/tests/Integration/tests/markdown/image-empty-alt-md/expected/logs/warning.log new file mode 100644 index 000000000..3ad6e52a8 --- /dev/null +++ b/tests/Integration/tests/markdown/image-empty-alt-md/expected/logs/warning.log @@ -0,0 +1 @@ +app.WARNING: Image https://example.org/example2.png does not have an alternative text. Add an alternative text like this: ![Image description](https://example.org/example2.png) diff --git a/tests/Integration/tests/markdown/image-empty-alt-md/input/index.md b/tests/Integration/tests/markdown/image-empty-alt-md/input/index.md index d575a37c3..afd67054a 100644 --- a/tests/Integration/tests/markdown/image-empty-alt-md/input/index.md +++ b/tests/Integration/tests/markdown/image-empty-alt-md/input/index.md @@ -1,3 +1,5 @@ -# additional_reports +# Images with and without alt text -![](https://raw.githubusercontent.com/Apen/additional_reports/master/Resources/Public/Images/middlewares.png) +![with alt Text](https://example.org/example.png) + +![](https://example.org/example2.png) diff --git a/tests/Integration/tests/markdown/image-empty-alt-md/input/skip b/tests/Integration/tests/markdown/image-empty-alt-md/input/skip deleted file mode 100644 index 000dd1834..000000000 --- a/tests/Integration/tests/markdown/image-empty-alt-md/input/skip +++ /dev/null @@ -1 +0,0 @@ -Images with empty alt text cause errors \ No newline at end of file From c253b99edd7657fbc7b18c69a72049191a3af180 Mon Sep 17 00:00:00 2001 From: Jaapio Date: Thu, 2 Nov 2023 09:38:04 +0100 Subject: [PATCH 4/4] TASK: add pull request templates for satilite libs To prevent people from creating a pr, add a template with instructions --- packages/guides-cli/.gitattributes | 1 + .../.github/pull_request_template.md | 18 ++++++++++++++++++ packages/guides-code/.gitattributes | 5 +++++ .../.github/pull_request_template.md | 18 ++++++++++++++++++ packages/guides-graphs/.gitattributes | 1 + .../.github/pull_request_template.md | 18 ++++++++++++++++++ packages/guides-markdown/.gitattributes | 1 + .../.github/pull_request_template.md | 18 ++++++++++++++++++ .../.github/pull_request_template.md | 18 ++++++++++++++++++ .../.github/pull_request_template.md | 18 ++++++++++++++++++ packages/guides/.gitattributes | 2 +- .../guides/.github/pull_request_template.md | 18 ++++++++++++++++++ 12 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 packages/guides-cli/.github/pull_request_template.md create mode 100644 packages/guides-code/.gitattributes create mode 100644 packages/guides-code/.github/pull_request_template.md create mode 100644 packages/guides-graphs/.github/pull_request_template.md create mode 100644 packages/guides-markdown/.github/pull_request_template.md create mode 100644 packages/guides-restructured-text/.github/pull_request_template.md create mode 100644 packages/guides-theme-bootstrap/.github/pull_request_template.md create mode 100644 packages/guides/.github/pull_request_template.md diff --git a/packages/guides-cli/.gitattributes b/packages/guides-cli/.gitattributes index 107086670..3017e2ae5 100644 --- a/packages/guides-cli/.gitattributes +++ b/packages/guides-cli/.gitattributes @@ -2,3 +2,4 @@ /docs export-ignore /tests export-ignore /.gitignore export-ignore +.github export-ignore diff --git a/packages/guides-cli/.github/pull_request_template.md b/packages/guides-cli/.github/pull_request_template.md new file mode 100644 index 000000000..09fc97f9d --- /dev/null +++ b/packages/guides-cli/.github/pull_request_template.md @@ -0,0 +1,18 @@ +# Contribute to the phpDocumentor Guides + +## Go to the mono-repository + +This project is developed in the mono-repository `phpDocumentor Guides `__. +The repository you are currently in gets auto-created by splitting the mono-repository. You **must not** contribute +to this repository directly but always to the mono-repository linked above. + +## Create Issues + +* If you find something missing or something is wrong in this library, you are welcome to write an issue + describing the problem: `Issues on GitHub `__. +* If you can, please try to fix the problem yourself. + +# Make changes (create pull requests) + +See the `Contribution chapter `__ in the +`Documentation` `__. diff --git a/packages/guides-code/.gitattributes b/packages/guides-code/.gitattributes new file mode 100644 index 000000000..3017e2ae5 --- /dev/null +++ b/packages/guides-code/.gitattributes @@ -0,0 +1,5 @@ +/.gitattributes export-ignore +/docs export-ignore +/tests export-ignore +/.gitignore export-ignore +.github export-ignore diff --git a/packages/guides-code/.github/pull_request_template.md b/packages/guides-code/.github/pull_request_template.md new file mode 100644 index 000000000..09fc97f9d --- /dev/null +++ b/packages/guides-code/.github/pull_request_template.md @@ -0,0 +1,18 @@ +# Contribute to the phpDocumentor Guides + +## Go to the mono-repository + +This project is developed in the mono-repository `phpDocumentor Guides `__. +The repository you are currently in gets auto-created by splitting the mono-repository. You **must not** contribute +to this repository directly but always to the mono-repository linked above. + +## Create Issues + +* If you find something missing or something is wrong in this library, you are welcome to write an issue + describing the problem: `Issues on GitHub `__. +* If you can, please try to fix the problem yourself. + +# Make changes (create pull requests) + +See the `Contribution chapter `__ in the +`Documentation` `__. diff --git a/packages/guides-graphs/.gitattributes b/packages/guides-graphs/.gitattributes index 107086670..3017e2ae5 100644 --- a/packages/guides-graphs/.gitattributes +++ b/packages/guides-graphs/.gitattributes @@ -2,3 +2,4 @@ /docs export-ignore /tests export-ignore /.gitignore export-ignore +.github export-ignore diff --git a/packages/guides-graphs/.github/pull_request_template.md b/packages/guides-graphs/.github/pull_request_template.md new file mode 100644 index 000000000..09fc97f9d --- /dev/null +++ b/packages/guides-graphs/.github/pull_request_template.md @@ -0,0 +1,18 @@ +# Contribute to the phpDocumentor Guides + +## Go to the mono-repository + +This project is developed in the mono-repository `phpDocumentor Guides `__. +The repository you are currently in gets auto-created by splitting the mono-repository. You **must not** contribute +to this repository directly but always to the mono-repository linked above. + +## Create Issues + +* If you find something missing or something is wrong in this library, you are welcome to write an issue + describing the problem: `Issues on GitHub `__. +* If you can, please try to fix the problem yourself. + +# Make changes (create pull requests) + +See the `Contribution chapter `__ in the +`Documentation` `__. diff --git a/packages/guides-markdown/.gitattributes b/packages/guides-markdown/.gitattributes index 107086670..3017e2ae5 100644 --- a/packages/guides-markdown/.gitattributes +++ b/packages/guides-markdown/.gitattributes @@ -2,3 +2,4 @@ /docs export-ignore /tests export-ignore /.gitignore export-ignore +.github export-ignore diff --git a/packages/guides-markdown/.github/pull_request_template.md b/packages/guides-markdown/.github/pull_request_template.md new file mode 100644 index 000000000..09fc97f9d --- /dev/null +++ b/packages/guides-markdown/.github/pull_request_template.md @@ -0,0 +1,18 @@ +# Contribute to the phpDocumentor Guides + +## Go to the mono-repository + +This project is developed in the mono-repository `phpDocumentor Guides `__. +The repository you are currently in gets auto-created by splitting the mono-repository. You **must not** contribute +to this repository directly but always to the mono-repository linked above. + +## Create Issues + +* If you find something missing or something is wrong in this library, you are welcome to write an issue + describing the problem: `Issues on GitHub `__. +* If you can, please try to fix the problem yourself. + +# Make changes (create pull requests) + +See the `Contribution chapter `__ in the +`Documentation` `__. diff --git a/packages/guides-restructured-text/.github/pull_request_template.md b/packages/guides-restructured-text/.github/pull_request_template.md new file mode 100644 index 000000000..09fc97f9d --- /dev/null +++ b/packages/guides-restructured-text/.github/pull_request_template.md @@ -0,0 +1,18 @@ +# Contribute to the phpDocumentor Guides + +## Go to the mono-repository + +This project is developed in the mono-repository `phpDocumentor Guides `__. +The repository you are currently in gets auto-created by splitting the mono-repository. You **must not** contribute +to this repository directly but always to the mono-repository linked above. + +## Create Issues + +* If you find something missing or something is wrong in this library, you are welcome to write an issue + describing the problem: `Issues on GitHub `__. +* If you can, please try to fix the problem yourself. + +# Make changes (create pull requests) + +See the `Contribution chapter `__ in the +`Documentation` `__. diff --git a/packages/guides-theme-bootstrap/.github/pull_request_template.md b/packages/guides-theme-bootstrap/.github/pull_request_template.md new file mode 100644 index 000000000..09fc97f9d --- /dev/null +++ b/packages/guides-theme-bootstrap/.github/pull_request_template.md @@ -0,0 +1,18 @@ +# Contribute to the phpDocumentor Guides + +## Go to the mono-repository + +This project is developed in the mono-repository `phpDocumentor Guides `__. +The repository you are currently in gets auto-created by splitting the mono-repository. You **must not** contribute +to this repository directly but always to the mono-repository linked above. + +## Create Issues + +* If you find something missing or something is wrong in this library, you are welcome to write an issue + describing the problem: `Issues on GitHub `__. +* If you can, please try to fix the problem yourself. + +# Make changes (create pull requests) + +See the `Contribution chapter `__ in the +`Documentation` `__. diff --git a/packages/guides/.gitattributes b/packages/guides/.gitattributes index b19c047ce..3017e2ae5 100644 --- a/packages/guides/.gitattributes +++ b/packages/guides/.gitattributes @@ -1,5 +1,5 @@ /.gitattributes export-ignore /docs export-ignore -/examples export-ignore /tests export-ignore /.gitignore export-ignore +.github export-ignore diff --git a/packages/guides/.github/pull_request_template.md b/packages/guides/.github/pull_request_template.md new file mode 100644 index 000000000..09fc97f9d --- /dev/null +++ b/packages/guides/.github/pull_request_template.md @@ -0,0 +1,18 @@ +# Contribute to the phpDocumentor Guides + +## Go to the mono-repository + +This project is developed in the mono-repository `phpDocumentor Guides `__. +The repository you are currently in gets auto-created by splitting the mono-repository. You **must not** contribute +to this repository directly but always to the mono-repository linked above. + +## Create Issues + +* If you find something missing or something is wrong in this library, you are welcome to write an issue + describing the problem: `Issues on GitHub `__. +* If you can, please try to fix the problem yourself. + +# Make changes (create pull requests) + +See the `Contribution chapter `__ in the +`Documentation` `__.