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

In projects that use MoOx/pjax, the title doesn't get the correct title, only the title of the page where you first entered the site #2834

Open
zhheo opened this issue Jul 5, 2024 · 0 comments

Comments

@zhheo
Copy link

zhheo commented Jul 5, 2024

Describe the Bug

In projects that use MoOx/pjaw, title cannot get the correct title, only the page title that enters the website for the first time.
My current solution is to change the following code:

r,title:O(_)

Change to:

r,title:O(document.title)

I was worried that there might be other potential issues, so I didn't submit a pr. It seems that MoOx/pjaw may not have triggered the MutationObserver listening for title, resulting in the content in the variable_not being updated (possibly).
I don't know if there are any plans for adaptation and compatibility, but the MoOx/pjaw project is widely used in a large number of static blogs, a large number of themes, etc.

在使用了MoOx/pjax的项目中,title无法获取正确的标题,只能获取第一次进入网站的页面标题
我目前的解决方法是下面一段代码进行更改:

r,title:O(_)

更改为:

r,title:O(document.title)

我担心可能存在潜在的其他问题,所以没有提交pr。MoOx/pjax似乎可能没有触发MutationObserver监听title的事件,导致没有更新变量_中的内容(可能)。

不知道有没有做适配兼容的计划,MoOx/pjax项目被广泛应用于大量的静态博客、大量主题等。

Database

PostgreSQL

Relevant log output

No response

Which Umami version are you using? (if relevant)

No response

Which browser are you using? (if relevant)

Edge

How are you deploying your application? (if relevant)

Docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant