Git Product home page Git Product logo

Comments (5)

ggrossetie avatar ggrossetie commented on May 30, 2024 1

I think you are mixing footer-scripts.hbs and footer-content.hbs.
This extension provides footer-scripts.hbs. If you copy the content of footer-scripts.hbs in footer-content.hbs it won't work.

from antora-lunr.

ggrossetie avatar ggrossetie commented on May 30, 2024

I don't know, the footer-scripts.hbs file provided by Antora Lunr should replace/overwrite this file: https://gitlab.com/antora/antora-ui-default/-/blob/master/src/partials/footer-scripts.hbs which contains:

<script src="{{{uiRootPath}}}/js/site.js"></script>
<script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>

Could you share the HTML produced by Antora where you have a duplicated ToC side panel?

from antora-lunr.

Adito5393 avatar Adito5393 commented on May 30, 2024

Here it is the output HTML with following footer-content.hbs:

<footer class="footer">
  <p>Copyright (C) {{year}} <a href="">...</a> -  // <a href="/">Privacy Statement</a>. Powered by <a href="https://antora.org">Antora</a>.</p>
</footer>
{{#if (eq env.DOCSEARCH_ENGINE 'lunr')}}
<script src="{{uiRootPath}}/js/vendor/lunr.js"></script>
<script src="{{uiRootPath}}/js/vendor/search.js" id="search-script" data-base-path="{{or siteRootPath (or site.url siteRootUrl)}}" data-page-path="{{@root.page.url}}"></script>
<script async src="{{uiRootPath}}/../search-index.js"></script>
{{/if}}
<script src="{{{uiRootPath}}}/js/site.js"></script>
<script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>

HTML output:

<html lang="en"><head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>The development guide :: Development Guide</title>
    <link rel="canonical" href="http://localhost:8080/basics/index.html">
    <link rel="next" href="vscode.html">
    <meta name="generator" content="Antora 2.3.4">
    <link rel="stylesheet" href="../_/css/site.css">
<link rel="stylesheet" href="../_/css/search.css">
<link rel="icon" href="../favicon.ico" type="image/x-icon">    <script>var uiRootPath = '../_'</script><style>@media print {#ghostery-tracker-tally {display:none !important}}</style>
  </head>
  <body class="article" data-new-gr-c-s-check-loaded="14.998.0" data-gr-ext-installed="">
<header class="header" role="banner">
  <nav class="navbar">
    <div class="navbar-brand">
      <div class="navbar-item">
        <span class="separator">//</span>
        <a href="http://localhost:8080">Development Guide</a>
      </div>
        <div class="navbar-item">
          <input id="search-input" type="text" placeholder="Search docs">
        <div class="search-result-dropdown-menu"></div></div>
      <button class="navbar-burger" data-target="topbar-nav">
        <span></span>
        <span></span>
        <span></span>
      </button>
    </div>
  </nav>
</header>
<div class="body">
<div class="nav-container" data-component="basics" data-version="master">
  <aside class="nav">
    <div class="panels">
<div class="nav-panel-menu is-active" data-panel="menu">
  <nav class="nav-menu">
    <h3 class="title"><a href="index.html">General Info</a></h3>
<ul class="nav-list">
  <li class="nav-item is-active is-current-path" data-depth="0">
<ul class="nav-list">
  <li class="nav-item is-current-page is-active" data-depth="1">
    <a class="nav-link" href="index.html">The development guide</a>
  </li>
  <li class="nav-item" data-depth="1">
    <a class="nav-link" href="vscode.html">Visual Studio Code (VS Code)</a>
  </li>
  <li class="nav-item" data-depth="1">
    <a class="nav-link" href="git.html">Git</a>
  </li>
  <li class="nav-item" data-depth="1">
    <a class="nav-link" href="regdocker.html">Private Docker Registry</a>
  </li>
  <li class="nav-item" data-depth="1">
    <a class="nav-link" href="apt.html">Apt Repositories</a>
  </li>
  <li class="nav-item" data-depth="1">
    <a class="nav-link" href="kernelRT.html">Real-time Kernel</a>
  </li>
  <li class="nav-item" data-depth="1">
    <a class="nav-link" href="maven.html">Apache Maven</a>
  </li>
</ul>
  </li>
  <li class="nav-item" data-depth="0">
<ul class="nav-list">
  <li class="nav-item" data-depth="1">
    <a class="nav-link" href="maven-example/intro.html">Maven Example</a>
  </li>
</ul>
  </li>
  <li class="nav-item" data-depth="0">
    <button class="nav-item-toggle"></button>
    <a class="nav-link" href="maven-template/general.html">Maven Templates</a>
<ul class="nav-list">
</ul>
  </li>
</ul>
  </nav>
</div>
<div class="nav-panel-explore" data-panel="explore">
  <div class="context">
    <span class="title">General Info</span>
    <span class="version">Latest</span>
  </div>
  <ul class="components">
    <li class="component is-current">
      <a class="title" href="index.html">General Info</a>
      <ul class="versions">
        <li class="version is-current is-latest">
          <a href="index.html">Latest</a>
        </li>
      </ul>
    </li>
  </ul>
</div>
    </div>
  </aside>
</div>
<main class="article">
<div class="toolbar" role="navigation">
<button class="nav-toggle"></button>
  <a href="index.html" class="home-link is-current"></a>
<nav class="breadcrumbs" aria-label="breadcrumbs">
  <ul>
    <li><a href="index.html">General Info</a></li>
    <li><a href="index.html">The development guide</a></li>
  </ul>
</nav>
  </div>
  <div class="content">
<aside class="toc sidebar" data-title="Contents" data-levels="2">
  <div class="toc-menu"><h3>Contents</h3><ul><li data-level="1"><a href="#_local_git">Local Git</a></li><li data-level="1"><a href="#_local_nexus_repository_manager">Local Nexus Repository Manager</a></li><li data-level="1"><a href="#_world_wide_..._docs">World-Wide ... docs</a></li></ul><h3>Contents</h3><ul><li data-level="1"><a href="#_local_git">Local Git</a></li><li data-level="1"><a href="#_local_nexus_repository_manager">Local Nexus Repository Manager</a></li><li data-level="1"><a href="#_world_wide_..._docs">World-Wide ... docs</a></li></ul></div>
</aside>
<article class="doc">
<h1 class="page">The development guide</h1>
<aside class="toc embedded"><div class="toc-menu"><h3>Contents</h3><ul><li data-level="1"><a href="#_local_git">Local Git</a></li><li data-level="1"><a href="#_local_nexus_repository_manager">Local Nexus Repository Manager</a></li><li data-level="1"><a href="#_world_wide_..._docs">World-Wide ... docs</a></li></ul><h3>Contents</h3><ul><li data-level="1"><a href="#_local_git">Local Git</a></li><li data-level="1"><a href="#_local_nexus_repository_manager">Local Nexus Repository Manager</a></li><li data-level="1"><a href="#_world_wide_..._docs">World-Wide ... docs</a></li></ul></div></aside><aside class="toc embedded"><div class="toc-menu"><h3>Contents</h3><ul><li data-level="1"><a href="#_local_git">Local Git</a></li><li data-level="1"><a href="#_local_nexus_repository_manager">Local Nexus Repository Manager</a></li><li data-level="1"><a href="#_world_wide_..._docs">World-Wide ... docs</a></li></ul></div></aside><div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>The following guide is aimed at helping software developers at ...</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_local_git"><a class="anchor" href="#_local_git"></a>Local Git</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The goal of the <a href="http:///">local Git</a> is to store and keep track of the source code of the software development. Registration is available on the website.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_local_nexus_repository_manager"><a class="anchor" href="#_local_nexus_repository_manager"></a>Local Nexus Repository Manager</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The goal of the <a href="http:///">local Repository Manager</a> is to store and share the binary components as final or beta version of the software.</p>
</div>
<div class="paragraph">
<p>Currently, this is configure for the <a href="maven.html" class="page">Maven</a> and <a href="regdocker.html" class="page">Docker</a> distribution of software.</p>
</div>
<div class="admonitionblock important">
<table>
<tbody><tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
<div class="title">Nexus Credentials</div>
<a href="mailto:">Request</a> your personal <strong>username</strong> and <strong>password</strong> to login to the website.
</td>
</tr>
</tbody></table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_world_wide_..._docs"><a class="anchor" href="#_world_wide_..._docs"></a>World-Wide ... docs</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Feel free to contribute to the <a href=""> documentation</a>.</p>
</div>
</div>
</div>
<nav class="pagination">
  <span class="next"><a href="vscode.html">Visual Studio Code (VS Code)</a></span>
</nav>
</article>
  </div>
</main>
</div>
<footer class="footer">
  <p>Copyright (C) 2021 <a href=""></a> -  // <a href="">Privacy Statement</a>. Powered by <a href="https://antora.org">Antora</a>.</p>
</footer>
<script src="../_/js/vendor/lunr.js"></script>
<script src="../_/js/vendor/search.js" id="search-script" data-base-path=".." data-page-path="/basics/index.html"></script>
<script async="" src="../_/../search-index.js"></script>
<script src="../_/js/site.js"></script>
<script async="" src="../_/js/vendor/highlight.js"></script>

<script src="../_/js/site.js"></script>
<script async="" src="../_/js/vendor/highlight.js"></script>
  

</body></html>

If you look at the footer-content.hbs from the official Antora docs, you will see there is no site.js or highlight.js included.

from antora-lunr.

Adito5393 avatar Adito5393 commented on May 30, 2024

Spot on! Now everything makes sense.

However, why do you choose to place the custom js links in the footer-scripts.hbs and not in the footer-content.hbs? As Antora did with their Algolia implementation.

The advantage I see with Antora's approach would be that if one has a custom UI, he does not have to manually keep the footer-scripts.hbs in sync with the playbook's footer-scripts.hbs. And the footer-scripts.hbs is always overwritten.

from antora-lunr.

ggrossetie avatar ggrossetie commented on May 30, 2024

However, why do you choose to place the custom js links in the footer-scripts.hbs and not in the footer-content.hbs

No particular reason except that it seems more "logical" to add it to footer-scripts.hbs

As Antora did with their Algolia implementation.

Do you have a link?

The advantage I see with Antora's approach would be that if one has a custom UI, he does not have to manually keep the footer-scripts.hbs in sync with the playbook's footer-scripts.hbs. And the footer-scripts.hbs is always overwritten.

Please keep in mind that this model will be overhauled.
Ideally, we would have an empty/placeholder file (footer-extra.hbs) where "extension providers" could add content.

Arguably it's less problematic but if we do that we would override the default footer content:

<footer class="footer">
  <p>This page was built using the Antora default UI.</p>
  <p>The source code for this UI is licensed under the terms of the MPL-2.0 license.</p>
</footer>

from antora-lunr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.