-
Notifications
You must be signed in to change notification settings - Fork 46
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
fix: add page title #108
fix: add page title #108
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.
This implementation appears to be more complex than what I had in mind.
In #74 I suggested simply adding a new component called <Head>
that can accept a title: string[]
.
Then we include this <Head>
component on every +page.svelte
where we want a custom title.
For example, in /routes/knowledge/[id]/+page.svelte
we could do:
<Head title={[knowledge.name, 'Knowledge']} />
That way you can avoid dealing with $settingsStore
and most of the other changes (except the implementation of getSessionTitle()
which I think it's a good idea 👍 ).
Will also need to remove <title>
from +layout.svelte
.
@fmaclen I applied the changes. Now there's only one thing that I'd like you to help me with. If you go to the Sessions page, the title will be The problem appears when you go back to the Sessions page by clicking it in the sidebar, because the title remains on How would you fix it? |
I think we should use the If that doesn't work, we will need to wrap the component in a logic block |
You were right! That was the fix, thank you. I think this is ready to be closed now. |
I've just merged |
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.
Almost done, left you a couple of minor changes.
@fmaclen I removed the Head component from |
Deploying hollama with
|
Latest commit: |
8b88097
|
Status: | ✅ Deploy successful! |
Preview URL: | https://ac17e0c0.hollama.pages.dev |
Branch Preview URL: | https://add-page-title.hollama.pages.dev |
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.
This looks good, let's ship it! 🚀
🎉 This PR is included in version 0.7.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closes #74