scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
833 stars 91 forks source link

Page Titles #220

Open gazpachoking opened 6 years ago

gazpachoking commented 6 years ago

It would be nice if the of the pages were more than just the site name, for easy identification when multiple tabs from the same site are open.</p> <p>My ideal system would be this:</p> <ul> <li>Page titles can be set in the realms config, using a jinja template with the WikiPage as context. e.g. <code>MySiteTitle - {{page.title}}</code></li> <li>Page titles would be equal to the first H1 by default</li> <li>Page titles could be overridden in the yaml metainfo block</li> </ul> <p>How to implement nicely I'm less sure on. We don't actually parse the markdown in python in order to pass it to the python level render. I'm less familiar with javascript, not sure if it's easy to grab the first h1 using markdownit and edit the page title after loading.</p> <p>Just looking for some feedback right now if anyone has some, I may give some implementations a try if I get inspired.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>