Skip to content

Commit

Permalink
Support separate HTML title and navbar name values
Browse files Browse the repository at this point in the history
  • Loading branch information
jtackaberry committed Feb 18, 2022
1 parent 997ae31 commit 4d4b1b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,9 @@ also be passed on the command line if you prefer).
```ini
[project]
# Project name that is displayed on the top bar of each page
name = My Lua Project
name = My Lua Project | Where Awesome Things Happen
# HTML title that is appended to every page. If not defined, name is used.
title = My Lua Project
# A list of files or directories for LuaDox to parse. Globs are supported.
# This can be spread across multiple lines if you want, as long as the
# other lines are indented.
Expand Down
4 changes: 2 additions & 2 deletions src/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def _render_html(self, topref, lines):
if not sections and topref.type == 'manual':
log.critical('manual "%s" has no sections (empty doc or possible symbol collision)', topref.name)
sys.exit(1)
title = self.config.get('project', 'name', fallback='Lua Project')
title = self.config.get('project', 'title', fallback=self.config.get('project', 'name', fallback='Lua Project'))
html_title = '{} - {}'.format(
sections[0].display if topref.type == 'manual' else topref.name,
title
Expand Down Expand Up @@ -426,7 +426,7 @@ def _render_html(self, topref, lines):
else:
prevref = ref

hometext = self.config.get('project', 'title', fallback=title)
hometext = self.config.get('project', 'name', fallback=title)
out('<div class="topbar">')
out('<div class="group one">')
if self.config.has_section('manual') and self.config.get('manual', 'index', fallback=None):
Expand Down

0 comments on commit 4d4b1b7

Please sign in to comment.