{{ if and (gt .WordCount 400 ) (.Params.toc) }}
<aside id="toc">
  <hr/>
  <header>
   <h4>Contents</h4>
  </header>
    {{ .TableOfContents }}
  <hr/> 
</aside>
<!-- Scroll to top button requires js, temp solution until cool sticky TOC is a thing -->
<button onclick="topFunction()" id="totop" title="Go to top"><i class="fas fa-chevron-up"></i></button>
{{ end }}

{{ if or (gt .WordCount 400 ) (.Params.toc) }}
<aside id="toc">
  <hr/>
  <header>
   <h4>Contents</h4>
  </header>
    {{ .TableOfContents }}
  <hr/> 
</aside>
<!-- Scroll to top button requires js, temp solution until cool sticky TOC is a thing -->
<button onclick="topFunction()" id="totop" title="Go to top"><i class="fas fa-chevron-up"></i></button>
{{ end }}

Make TOC forcable by OR'ing a former AND
Make TOC forcable by OR'ing a former AND
