Skip to content
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

Add option for adding content at the start/end of every webpage. #533

Open
WinnerWind opened this issue Oct 16, 2024 · 2 comments
Open

Add option for adding content at the start/end of every webpage. #533

WinnerWind opened this issue Oct 16, 2024 · 2 comments
Labels
enhancement New feature or request has-link This issue provides a link (possibly to a resource helpful to reproduce the issue)

Comments

@WinnerWind
Copy link

Is your feature request related to a problem? Please describe.
I like to link a page on my website that takes the viewer to the Contact page where they can contact me for further queries or corrections.
image
This needs to be manually added to every single file, which takes up space and makes it hard to edit down the line (Eg. I move where the contact's page is down the line)

Describe the solution you'd like
An option to add a header template and a footer template file as defined by the user, which automatically appends the contents of those files to the start/end of every page/defined pages

Describe alternatives you've considered
Copy pasting each and every note
using templates
Using tags to quickly find the place where this contact's footer is found
frontmatter

Additional context
There exists an option to use Head content for the plugin, especially with regards to my use case, but I am not sure how to use it for this purpose. It seems perfect, but I am not sure how to use it. A guide would be helpful.

@WinnerWind WinnerWind added the enhancement New feature or request label Oct 16, 2024
@github-actions github-actions bot added the has-link This issue provides a link (possibly to a resource helpful to reproduce the issue) label Oct 16, 2024
@KosmosisDire
Copy link
Owner

Yes this should be acomplished using the head content. I will create a tutorial for document modifications eventually. But basically you can just upload a javascript file that would add the element dynamically to each page when it loads. You can explore the available frontend api by opening the dev tools on your exported site and typing in ObsidianSite. and exploruing the different objects and options available to interact with.

@WinnerWind
Copy link
Author

Hi there. It seems my email didn't go through.

I'm looking forward to that tutorial. I looked around in ObsidianSite. but couldn't find anything that was relevant to my needs. Could you point me to the most relevant function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request has-link This issue provides a link (possibly to a resource helpful to reproduce the issue)
Projects
None yet
Development

No branches or pull requests

2 participants