Conversation
.Site.Params.Taxonomy.taxonomyCloud
use isset for check parameter .Site.Params.Taxonomy.taxonomyPageHeader
Collaborator
|
This is great, thanks! |
Collaborator
|
For the record, this is how the generated user guide pages were affected: $ (cd public && git diff -bw --ignore-blank-lines -- . ':(exclude)*.xml') | grep ^diff
diff --git a/docs/_print/index.html b/docs/_print/index.html
diff --git a/docs/adding-content/_print/index.html b/docs/adding-content/_print/index.html
diff --git a/docs/adding-content/taxonomy/index.html b/docs/adding-content/taxonomy/index.htmlAnd here are the diff details: diff --git a/docs/_print/index.html b/docs/_print/index.html
index 90fb439..c5033df 100644
--- a/docs/_print/index.html
+++ b/docs/_print/index.html
@@ -3181,7 +3181,9 @@ for your project.</p>
<span style="color:#000;font-weight:bold"><</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">><</span><span style="color:#204a87;font-weight:bold">a</span> <span style="color:#c4a000">class</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"taxonomy-term"</span> <span style="color:#c4a000">href</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"//localhost:1313/tags/labelling/"</span> <span style="color:#c4a000">data-taxonomy-term</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"labelling"</span><span style="color:#000;font-weight:bold">><</span><span style="color:#204a87;font-weight:bold">span</span> <span style="color:#c4a000">class</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"taxonomy-label"</span><span style="color:#000;font-weight:bold">></span>Labelling<span style="color:#000;font-weight:bold"></</span><span style="color:#204a87;font-weight:bold">span</span><span style="color:#000;font-weight:bold">></</span><span style="color:#204a87;font-weight:bold">a</span><span style="color:#000;font-weight:bold">></</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">></span>
<span style="color:#000;font-weight:bold"></</span><span style="color:#204a87;font-weight:bold">ul</span><span style="color:#000;font-weight:bold">></span>
<span style="color:#000;font-weight:bold"></</span><span style="color:#204a87;font-weight:bold">div</span><span style="color:#000;font-weight:bold">></span>
-</code></pre></div><h3 id="taxonomy_terms_cloud">taxonomy_terms_cloud</h3>
+</code></pre></div><h3 id="taxonomy_terms_article_wrapper">taxonomy_terms_article_wrapper</h3>
+<p>The partial <code>taxonomy_terms_article_wrapper</code> is a wrapper for the partial <code>taxonomy_terms_article</code> with the only parameter <code>context</code> (most of the time the current page or context <code>.</code>) and checks the taxonomy parameters of you projects <code>config.toml</code> to loop threw all listed taxonomies in the parameter <code>taxonomyPageHeader</code> resp. all defined taxonomies of your page, if <code>taxonomyPageHeader</code> isn’t set.</p>
+<h3 id="taxonomy_terms_cloud">taxonomy_terms_cloud</h3>
<p>The partial <code>taxonomy_terms_cloud</code> shows all used terms of an given taxonomy (partial parameter <code>taxo</code>) for your site (partial parameter <code>context</code>, most of the time the current page or context <code>.</code>) and with the parameter <code>title</code> as headline.</p>
<p>Example usage in partial <code>taxonomy_terms_clouds</code> for showing all defined taxonomies and its terms:</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go-html-template" data-lang="go-html-template"><span style="color:#8f5902;font-style:italic">{{</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">$context</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#ce5c00;font-weight:bold">:=</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#c4a000">.</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">}}</span>
diff --git a/docs/adding-content/_print/index.html b/docs/adding-content/_print/index.html
index b017b52..13a83ad 100644
--- a/docs/adding-content/_print/index.html
+++ b/docs/adding-content/_print/index.html
@@ -2599,7 +2599,9 @@ for your project.</p>
<span style="color:#000;font-weight:bold"><</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">><</span><span style="color:#204a87;font-weight:bold">a</span> <span style="color:#c4a000">class</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"taxonomy-term"</span> <span style="color:#c4a000">href</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"//localhost:1313/tags/labelling/"</span> <span style="color:#c4a000">data-taxonomy-term</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"labelling"</span><span style="color:#000;font-weight:bold">><</span><span style="color:#204a87;font-weight:bold">span</span> <span style="color:#c4a000">class</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"taxonomy-label"</span><span style="color:#000;font-weight:bold">></span>Labelling<span style="color:#000;font-weight:bold"></</span><span style="color:#204a87;font-weight:bold">span</span><span style="color:#000;font-weight:bold">></</span><span style="color:#204a87;font-weight:bold">a</span><span style="color:#000;font-weight:bold">></</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">></span>
<span style="color:#000;font-weight:bold"></</span><span style="color:#204a87;font-weight:bold">ul</span><span style="color:#000;font-weight:bold">></span>
<span style="color:#000;font-weight:bold"></</span><span style="color:#204a87;font-weight:bold">div</span><span style="color:#000;font-weight:bold">></span>
-</code></pre></div><h3 id="taxonomy_terms_cloud">taxonomy_terms_cloud</h3>
+</code></pre></div><h3 id="taxonomy_terms_article_wrapper">taxonomy_terms_article_wrapper</h3>
+<p>The partial <code>taxonomy_terms_article_wrapper</code> is a wrapper for the partial <code>taxonomy_terms_article</code> with the only parameter <code>context</code> (most of the time the current page or context <code>.</code>) and checks the taxonomy parameters of you projects <code>config.toml</code> to loop threw all listed taxonomies in the parameter <code>taxonomyPageHeader</code> resp. all defined taxonomies of your page, if <code>taxonomyPageHeader</code> isn’t set.</p>
+<h3 id="taxonomy_terms_cloud">taxonomy_terms_cloud</h3>
<p>The partial <code>taxonomy_terms_cloud</code> shows all used terms of an given taxonomy (partial parameter <code>taxo</code>) for your site (partial parameter <code>context</code>, most of the time the current page or context <code>.</code>) and with the parameter <code>title</code> as headline.</p>
<p>Example usage in partial <code>taxonomy_terms_clouds</code> for showing all defined taxonomies and its terms:</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go-html-template" data-lang="go-html-template"><span style="color:#8f5902;font-style:italic">{{</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">$context</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#ce5c00;font-weight:bold">:=</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#c4a000">.</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">}}</span>
diff --git a/docs/adding-content/taxonomy/index.html b/docs/adding-content/taxonomy/index.html
index c836623..7c45424 100644
--- a/docs/adding-content/taxonomy/index.html
+++ b/docs/adding-content/taxonomy/index.html
@@ -27,13 +27,13 @@
<meta property="og:type" content="article" />
<meta property="og:url" content="/docs/adding-content/taxonomy/" /><meta property="article:section" content="docs" />
-<meta property="article:modified_time" content="2021-06-15T23:06:47+02:00" /><meta property="og:site_name" content="Docsy" />
+<meta property="article:modified_time" content="2022-02-18T20:26:42+01:00" /><meta property="og:site_name" content="Docsy" />
<meta itemprop="name" content="Taxonomy Support">
<meta itemprop="description" content="Structure the content using taxonomies like tags, categories, labels.
">
-<meta itemprop="dateModified" content="2021-06-15T23:06:47+02:00" />
-<meta itemprop="wordCount" content="826">
+<meta itemprop="dateModified" content="2022-02-18T20:26:42+01:00" />
+<meta itemprop="wordCount" content="882">
<meta itemprop="keywords" content="Tagging,Structuring Content,Labelling," /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Taxonomy Support"/>
<meta name="twitter:description" content="Structure the content using taxonomies like tags, categories, labels.
@@ -242,6 +242,7 @@
<li><a href="#partials">Partials</a>
<ul>
<li><a href="#taxonomy_terms_article">taxonomy_terms_article</a></li>
+ <li><a href="#taxonomy_terms_article_wrapper">taxonomy_terms_article_wrapper</a></li>
<li><a href="#taxonomy_terms_cloud">taxonomy_terms_cloud</a></li>
<li><a href="#taxonomy_terms_clouds">taxonomy_terms_clouds</a></li>
</ul>
@@ -412,7 +413,9 @@
<span style="color:#000;font-weight:bold"><</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">><</span><span style="color:#204a87;font-weight:bold">a</span> <span style="color:#c4a000">class</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"taxonomy-term"</span> <span style="color:#c4a000">href</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"//localhost:1313/tags/labelling/"</span> <span style="color:#c4a000">data-taxonomy-term</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"labelling"</span><span style="color:#000;font-weight:bold">><</span><span style="color:#204a87;font-weight:bold">span</span> <span style="color:#c4a000">class</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">"taxonomy-label"</span><span style="color:#000;font-weight:bold">></span>Labelling<span style="color:#000;font-weight:bold"></</span><span style="color:#204a87;font-weight:bold">span</span><span style="color:#000;font-weight:bold">></</span><span style="color:#204a87;font-weight:bold">a</span><span style="color:#000;font-weight:bold">></</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">></span>
<span style="color:#000;font-weight:bold"></</span><span style="color:#204a87;font-weight:bold">ul</span><span style="color:#000;font-weight:bold">></span>
<span style="color:#000;font-weight:bold"></</span><span style="color:#204a87;font-weight:bold">div</span><span style="color:#000;font-weight:bold">></span>
-</code></pre></div><h3 id="taxonomy_terms_cloud">taxonomy_terms_cloud</h3>
+</code></pre></div><h3 id="taxonomy_terms_article_wrapper">taxonomy_terms_article_wrapper</h3>
+<p>The partial <code>taxonomy_terms_article_wrapper</code> is a wrapper for the partial <code>taxonomy_terms_article</code> with the only parameter <code>context</code> (most of the time the current page or context <code>.</code>) and checks the taxonomy parameters of you projects <code>config.toml</code> to loop threw all listed taxonomies in the parameter <code>taxonomyPageHeader</code> resp. all defined taxonomies of your page, if <code>taxonomyPageHeader</code> isn’t set.</p>
+<h3 id="taxonomy_terms_cloud">taxonomy_terms_cloud</h3>
<p>The partial <code>taxonomy_terms_cloud</code> shows all used terms of an given taxonomy (partial parameter <code>taxo</code>) for your site (partial parameter <code>context</code>, most of the time the current page or context <code>.</code>) and with the parameter <code>title</code> as headline.</p>
<p>Example usage in partial <code>taxonomy_terms_clouds</code> for showing all defined taxonomies and its terms:</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go-html-template" data-lang="go-html-template"><span style="color:#8f5902;font-style:italic">{{</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">$context</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#ce5c00;font-weight:bold">:=</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#c4a000">.</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">}}</span>
@@ -499,7 +502,7 @@
<div class="text-muted mt-5 pt-3 border-top">
- Last modified June 15, 2021: <a href="https://github.com/google/docsy/commit/6a95df6284917fce8e7795b331a02e1842ce7865">dev content removed and taxonomy manual adopted (6a95df6)</a>
+ Last modified February 18, 2022: <a href="https://github.com/google/docsy/commit/66818eb0905c014f342432c5fc918fc4b1c04b57">Taxonomy bugfix (#895) (66818eb)</a>
</div>
</div> |
Contributor
Author
|
If I haven't fail to see anything, this changes should come all from my additional infos in the manual: I've introduced a wrapper for the taxonomy terms in each article as reusable partial. So the code should be a little bit better to maintain. |
Collaborator
Yes, great. Thanks! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As reported in #888 the option to remove the taxonomy clouds in the sidebar didn't work anymore.
This PR is a bugfix for issue #888 and fixes also the same problem with the option to remove the taxonomy infos on each article
<header>holding the meta infos of the current article.My old github username was @narrenfrei. I'm sorry, but I had to change it.