emacsorphanage / org-page

[INACTIVE] A static site generator based on Emacs and org mode.
673 stars 99 forks source link

Tags header generates twice #228

Open broken-username opened 6 years ago

broken-username commented 6 years ago

Hello,

I've noticed that, when I do an "op/do-publication", most everything works, but the "Tags" header generates twice (two Tags items at the top of the page, both leading to the same place). I haven't figured out why this is and would rather not have to manually remove that second Tag link every time. What am I doing wrong, if anything? It's been pretty frustrating trying to work around it.

GnaneshKunal commented 5 years ago

Have you come up with a solution? I'm facing the same problem. Looks like the "Tags" header was hardcoded but I don't clearly understand why just that particular header is appearing twice.

GnaneshKunal commented 5 years ago

I solved it by commenting the hardcoded "Tags" header from the header file. The overall header generation is such that when a new folder is being created, it is given a separate header. So when we compile the project we get a "blog" folder and also a "tags" folder. So the header generation is such that we get both the dynamic and static headers. blog and tags headers are generated dynamically. And the remaining hardcoded(static) headers are appended to it.

Removing the Tags(hardcoded link): The file is in op/themes/{YOUR_THEME}/templates/nav.mustache The default theme is mdo. My file was in /home/monster/.emacs.d/elpa/org-page-20170807.224/themes/mdo/templates/nav.mustache

          <ul>
          {{#nav-categories}}
          <li><a href="{{category-uri}}">{{category-name}}</a></li>
          {{/nav-categories}}
      <!--
          <li><a href="/tags/">Tags</a></li>
      -->
          <li><a href="/about/">About</a></li>
          <li><a href="{{github}}">GitHub</a></li>
          <li><a href="/rss.xml">RSS</a></li>
        </ul>

Now compile the project, you won't get multiple "Tags" header.

yantar92 commented 10 months ago

I am unable to reproduce this.