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

$title compat with vuepress #158

Closed
patak-dev opened this issue Nov 26, 2020 · 3 comments · Fixed by #163
Closed

$title compat with vuepress #158

patak-dev opened this issue Nov 26, 2020 · 3 comments · Fixed by #163
Assignees
Labels
bug Something isn't working

Comments

@patak-dev
Copy link
Member

@kiaking when working on #152, I assumed that it was the title that appeared in the sidebar links:

$title = $page.title || $site.title

But reviewing the code in Vuepress, it looks like it is actually the title of the document:

$title = ( $page.title ? $page.title + ' | ' + $site.title ) : $site.title

I think it is more useful as we have it (and maybe add a $documentTitle), but maybe we need to align it to vuepress and have:

$title <- same as in vuepress
$sidebarTitle <- current one (or we do not expose this one at all)

It will be an interesting walk to keep as much of compat with vuepress but take the opportunity to break what could be improved. I am fine with both options here.

Thoughts?

@kiaking
Copy link
Member

kiaking commented Nov 27, 2020

Ah, nice catch. I think we should align with VuePress about this one. Since $description is getting the actual description for the site, we should do same with the $title too.

But I understand the pain. How about making $page.title always exist as you mentioned in another issue. So page title becomes:

infertTitle(page.title) || siteDataByRoute.title

Since it's essential for pages to have title so 😳

@kiaking kiaking added the bug Something isn't working label Nov 27, 2020
@patak-dev
Copy link
Member Author

I agree with both.

I'll send a PR 👍

@kiaking
Copy link
Member

kiaking commented Nov 27, 2020

Wonderful! 🙌

kiaking pushed a commit that referenced this issue Nov 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants