Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taxonomy bugfix #895

Merged
merged 7 commits into from
Feb 18, 2022
Merged

Taxonomy bugfix #895

merged 7 commits into from
Feb 18, 2022

Conversation

raum51
Copy link
Contributor

@raum51 raum51 commented Feb 18, 2022

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.

@LisaFC
Copy link
Collaborator

LisaFC commented Feb 18, 2022

This is great, thanks!

@LisaFC LisaFC merged commit 66818eb into google:master Feb 18, 2022
@raum51 raum51 deleted the taxonomy-bugfix branch February 20, 2022 21:19
@raum51 raum51 restored the taxonomy-bugfix branch February 20, 2022 21:20
@raum51 raum51 deleted the taxonomy-bugfix branch February 20, 2022 21:23
@chalin
Copy link
Collaborator

chalin commented Feb 21, 2022

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.html

And 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">&lt;</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">&gt;&lt;</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">&#34;taxonomy-term&#34;</span> <span style="color:#c4a000">href</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#34;//localhost:1313/tags/labelling/&#34;</span> <span style="color:#c4a000">data-taxonomy-term</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#34;labelling&#34;</span><span style="color:#000;font-weight:bold">&gt;&lt;</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">&#34;taxonomy-label&#34;</span><span style="color:#000;font-weight:bold">&gt;</span>Labelling<span style="color:#000;font-weight:bold">&lt;/</span><span style="color:#204a87;font-weight:bold">span</span><span style="color:#000;font-weight:bold">&gt;&lt;/</span><span style="color:#204a87;font-weight:bold">a</span><span style="color:#000;font-weight:bold">&gt;&lt;/</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">&gt;</span>
   <span style="color:#000;font-weight:bold">&lt;/</span><span style="color:#204a87;font-weight:bold">ul</span><span style="color:#000;font-weight:bold">&gt;</span>
 <span style="color:#000;font-weight:bold">&lt;/</span><span style="color:#204a87;font-weight:bold">div</span><span style="color:#000;font-weight:bold">&gt;</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&rsquo;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">&lt;</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">&gt;&lt;</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">&#34;taxonomy-term&#34;</span> <span style="color:#c4a000">href</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#34;//localhost:1313/tags/labelling/&#34;</span> <span style="color:#c4a000">data-taxonomy-term</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#34;labelling&#34;</span><span style="color:#000;font-weight:bold">&gt;&lt;</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">&#34;taxonomy-label&#34;</span><span style="color:#000;font-weight:bold">&gt;</span>Labelling<span style="color:#000;font-weight:bold">&lt;/</span><span style="color:#204a87;font-weight:bold">span</span><span style="color:#000;font-weight:bold">&gt;&lt;/</span><span style="color:#204a87;font-weight:bold">a</span><span style="color:#000;font-weight:bold">&gt;&lt;/</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">&gt;</span>
   <span style="color:#000;font-weight:bold">&lt;/</span><span style="color:#204a87;font-weight:bold">ul</span><span style="color:#000;font-weight:bold">&gt;</span>
 <span style="color:#000;font-weight:bold">&lt;/</span><span style="color:#204a87;font-weight:bold">div</span><span style="color:#000;font-weight:bold">&gt;</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&rsquo;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">&lt;</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">&gt;&lt;</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">&#34;taxonomy-term&#34;</span> <span style="color:#c4a000">href</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#34;//localhost:1313/tags/labelling/&#34;</span> <span style="color:#c4a000">data-taxonomy-term</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#34;labelling&#34;</span><span style="color:#000;font-weight:bold">&gt;&lt;</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">&#34;taxonomy-label&#34;</span><span style="color:#000;font-weight:bold">&gt;</span>Labelling<span style="color:#000;font-weight:bold">&lt;/</span><span style="color:#204a87;font-weight:bold">span</span><span style="color:#000;font-weight:bold">&gt;&lt;/</span><span style="color:#204a87;font-weight:bold">a</span><span style="color:#000;font-weight:bold">&gt;&lt;/</span><span style="color:#204a87;font-weight:bold">li</span><span style="color:#000;font-weight:bold">&gt;</span>
   <span style="color:#000;font-weight:bold">&lt;/</span><span style="color:#204a87;font-weight:bold">ul</span><span style="color:#000;font-weight:bold">&gt;</span>
 <span style="color:#000;font-weight:bold">&lt;/</span><span style="color:#204a87;font-weight:bold">div</span><span style="color:#000;font-weight:bold">&gt;</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&rsquo;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>

@raum51
Copy link
Contributor Author

raum51 commented Feb 22, 2022

If I haven't fail to see anything, this changes should come all from my additional infos in the manual:
https://www.docsy.dev/docs/adding-content/taxonomy/#taxonomy_terms_article_wrapper

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.

@chalin
Copy link
Collaborator

chalin commented Feb 22, 2022

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.

Yes, great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants