-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wiki title as variable #171
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/wikmd/templates/base.html
Outdated
@@ -39,14 +39,14 @@ | |||
} | |||
</style> | |||
|
|||
<title>Wiki</title> | |||
<title>{% if wiki_title %}{{ wiki_title }}{% endif %}</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the if?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
render failed when the var was empty, but since it has has a default value now it shouldn't be a problem
src/wikmd/templates/base.html
Outdated
</head> | ||
|
||
<body> | ||
<!-- Navbar top --> | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top"> | ||
<div class="container-fluid mx-2"> | ||
<a class="navbar-brand" href="/">Wiki</a> | ||
<a class="navbar-brand" href="/">{% if wiki_title %}{{ wiki_title }}{% endif %}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed!
src/wikmd/wiki.py
Outdated
upload_path=cfg.images_route, | ||
image_allowed_mime=cfg.image_allowed_mime, | ||
system=SYSTEM_SETTINGS, | ||
wiki_title=cfg.wiki_title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just add it to the system settings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that's way better, I've pushed changes
ba17192
to
b362cd1
Compare
Summary
Changes from hardcoded "Wiki" as title in head and navbar to a variable.
It would be cool to have a prefix in <title> depending on which page is displayed. E.g. "homepage | Wiki". I could have a look at figuring it out but I'm not sure what would be a clean way to implement it.
Details
Checks
docs/<corresponding file>