McShelby / hugo-theme-relearn

A theme for Hugo designed for documentation
https://mcshelby.github.io/hugo-theme-relearn/
MIT License
433 stars 187 forks source link

search: search page not generated with renderer.unsafe #929

Closed nbam-e closed 1 month ago

nbam-e commented 1 month ago

Since v7.0.0, the search box on the on the dedicated search page is missing when the goldmark renderer is not in unsafe mode.

E.g. when config.toml contains:

[markup]
    [markup.goldmark]
        renderer.unsafe = false

The output file search/index.html contains a "raw HTML omitted" error.

<h1 id="search">Search</h1>

<!-- raw HTML omitted -->

  <footer class="footline">
  </footer>

Switching renderer.unsafe to true fixes the search page. search/index.html then contains:

<h1 id="search">Search</h1>

<search>
  <form action="javascript:triggerSearch()">
    <div class="searchform">
      <label class="a11y-only" for="R-search-by-detail">Search</label>
      <input data-search-input id="R-search-by-detail" class="search-by" name="search-by" type="search" placeholder="Search..."><span class="btn cstyle interactive secondary"><button onclick="" type="submit"><i class="fa-fw fas fa-search"></i> <span class="title">Search</span></button></span>
    </div>
  </form>
</search>
<div class="searchhint">
</div>
<hr>
<div id="R-searchresults">
</div>

  <footer class="footline">
  </footer>
McShelby commented 1 month ago

Thanks for reporting. Fixed in 7.0.1