-
Notifications
You must be signed in to change notification settings - Fork 5
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
Description element trimmed improperly #10
Comments
Hi @mthu, Fixed! At your disposal, |
I've looked at this and it seems to take the heading of the page and just the first 250 or 500 characters with \n (line breaks) which do not render well with Google SERP. I suggest replacing the line breaks with Full Stops (.) and a space character. Which would make things read a lot better. |
Just for interest my code for that is: public function getDescription() { |
Hi, at following line, ltrim function is called improperly. The second argument is a set of characters, not a string prefix, so it does not strip the whole title from the beginning of the abstract as probably expected but it can strip more than that.
https://github.com/LotarProject/dokuwiki-plugin-semantic/blob/3d4d0233fdf169fb393884ee80cf68fc9b95294f/helper.php#L83
This leads to bad behavior. For example, having:
Abstract: "Adding a LDAP directory as a contact source for Thunderbird can be quite tricky .... "
Title: "Thunderbird LDAP via SSL with self-signed certificate"
is leading to output: "ory as a contact source for Thunderbird can be quite tricky ...."
In my Dokuwiki instance, the abstract is not prefixed with the page title, so no stripping is needed. Instead, something like this works for me (use title if no abstract is present):
The text was updated successfully, but these errors were encountered: