-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Introduce noindex option for confvals
https://sphinx-toolbox.readthedocs.io/en/stable/extensions/confval.html#directive-option-confval-noindex releases: main, 1.0
- Loading branch information
Showing
10 changed files
with
173 additions
and
3 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/guides-restructured-text/resources/template/html/body/directive/confval.html.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of phpDocumentor. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @link https://phpdoc.org | ||
*/ | ||
|
||
namespace phpDocumentor\Guides\Nodes; | ||
|
||
/** | ||
* Makes the implementing node an optional link target. If Noindex is true | ||
* no references are generated, there is no entry in the objects index and no | ||
* warning about duplicate ids. | ||
* | ||
* Used for example in https://sphinx-toolbox.readthedocs.io/en/stable/extensions/confval.html#directive-option-confval-noindex | ||
*/ | ||
interface OptionalLinkTargetsNode extends LinkTargetNode | ||
{ | ||
public function isNoindex(): bool; | ||
} |
27 changes: 27 additions & 0 deletions
27
tests/Integration/tests/confval/confval-noindex/expected/another.html
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,27 @@ | ||
<!-- content start --> | ||
<div class="section" id="confval-directive"> | ||
<h1>Confval directive</h1> | ||
<dl class="confval"> | ||
<dt> | ||
<code class="sig-name descname"><span class="pre">demo</span></code></dt> | ||
<dd> | ||
<div class="line-block"> | ||
<div class="line"><strong>Type:</strong> <code>"Hello World"</code></div> | ||
<div class="line"><strong>Required:</strong> true</div> | ||
<div class="line"><strong>Custom Info:</strong> <strong>custom</strong></div> | ||
|
||
</div> | ||
<div class="confval-description"> | ||
|
||
<p>This is the confval <code>demo</code> content!</p> | ||
|
||
<p>Another paragraph.</p> | ||
|
||
</div> | ||
</dd> | ||
</dl> | ||
|
||
<p>See option <a href="/index.html#confval-demo">demo</a>.</p> | ||
|
||
</div> | ||
<!-- content end --> |
36 changes: 36 additions & 0 deletions
36
tests/Integration/tests/confval/confval-noindex/expected/index.html
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,36 @@ | ||
<!-- content start --> | ||
<div class="section" id="confval-directive"> | ||
<h1>Confval directive</h1> | ||
<dl class="confval"> | ||
<dt id="confval-demo"> | ||
<code class="sig-name descname"><span class="pre">demo</span></code></dt> | ||
<dd> | ||
<div class="line-block"> | ||
<div class="line"><strong>Type:</strong> <code>"Hello World"</code></div> | ||
<div class="line"><strong>Required:</strong> true</div> | ||
<div class="line"><strong>Custom Info:</strong> <strong>custom</strong></div> | ||
|
||
</div> | ||
<div class="confval-description"> | ||
|
||
<p>This is the confval <code>demo</code> content!</p> | ||
|
||
<p>Another paragraph.</p> | ||
|
||
</div> | ||
</dd> | ||
</dl> | ||
|
||
<p>See option <a href="/index.html#confval-demo">demo</a>.</p> | ||
|
||
<div class="toc"> | ||
<ul class="menu-level"> | ||
<li class="toc-item"> | ||
<a href="/another.html#confval-directive">Confval directive</a> | ||
|
||
|
||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
<!-- content end --> |
32 changes: 32 additions & 0 deletions
32
tests/Integration/tests/confval/confval-noindex/expected/objects.inv.json
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,32 @@ | ||
{ | ||
"std:doc": { | ||
"another": [ | ||
"-", | ||
"-", | ||
"another.html", | ||
"Confval directive" | ||
], | ||
"index": [ | ||
"-", | ||
"-", | ||
"index.html", | ||
"Confval directive" | ||
] | ||
}, | ||
"std:label": { | ||
"confval-directive": [ | ||
"-", | ||
"-", | ||
"index.html#confval-directive", | ||
"Confval directive" | ||
] | ||
}, | ||
"std:confval": { | ||
"demo": [ | ||
"-", | ||
"-", | ||
"index.html#demo", | ||
"demo" | ||
] | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/Integration/tests/confval/confval-noindex/input/another.rst
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,15 @@ | ||
Confval directive | ||
================= | ||
|
||
.. confval:: demo | ||
:type: :php:`string` | ||
:default: ``"Hello World"`` | ||
:required: true | ||
:Custom Info: **custom** | ||
:noindex: | ||
|
||
This is the confval ``demo`` content! | ||
|
||
Another paragraph. | ||
|
||
See option :confval:`demo`. |
19 changes: 19 additions & 0 deletions
19
tests/Integration/tests/confval/confval-noindex/input/index.rst
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,19 @@ | ||
Confval directive | ||
================= | ||
|
||
.. confval:: demo | ||
:type: :php:`string` | ||
:default: ``"Hello World"`` | ||
:required: true | ||
:Custom Info: **custom** | ||
|
||
This is the confval ``demo`` content! | ||
|
||
Another paragraph. | ||
|
||
See option :confval:`demo`. | ||
|
||
.. toctree:: | ||
:glob: | ||
|
||
* |