Make page title configurable #106
No reviewers
Labels
No labels
bug
config
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
orinoco/shacl-vue!106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "config-title"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This could be a very stupid way to do this, because I have no idea how to actually do this correctly. But locally, this is a way with which I can make the title configurable. Very happy to learn how to do this well :)
Thanks @adswa. This is actually a neat way of doing it, circumventing VueJS which is not necessarily a bad thing. Before I merge:
head. I vaguely recall something to do with VueJS meta tag handling, but I am not certain right now.fetchcall throws an error or in case the config does not contain/publicpart, since the build+deployed version of the application will have all files that were in/publicat the root level. Worth testing first, though.I will report back once I've checked the first one.
UPDATE:
datalad-catalog, see:github.com/datalad/datalad-catalog@c911350089/datalad_catalog/catalog/assets/app_component_dataset.js (L310-L349)Stephan, its terrible, you motivated me to try to write JavaScript with absolutely no knowledge :D I do not want to disclose how long it took me to write the very likely extremely bad lines I just committed. I added a fallback if page_title isn't defined to use the app_name, and to use welcome to shacl-vue as a last resort. Happy to learn how to improve this!
It's not terrible at all, seriously. I think we should use pretty much exactly that code, but then just move it to a separate place, possibly in App.vue, then assign the value of the document title from there. Just need to check whether this would be assigned semi-immediately when the page is loaded or whether it's delayed by some other fetch/load operations (which would be a reason not to follow my suggestion).
@adswa I moved your logic to the place where config was already processed. Thanks!