-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Put Wiki Content into Open Graph Descriptions #1896
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 is a solid implementation. There's a complexity increase, but it's not significant and we gain useful value. Many commercial wiki products have significantly worse open graph description renderers than this 😅.
I've left a few suggestions.
Good review @nattthebear . It makes sense. If I use optimization as a reason to not follow convention, then I should properly optimize everywhere. I will resolve this in a few hours, when I have more time. |
Those commits should do it. |
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 is a great feature. Thanks for building it.
Relevant to #1644 .
Basically, our meta tag descriptions on wiki pages currently show when the page was last edited. Which isn't really useful.
What would be useful instead is to take the first few lines of the wiki and put the text of that into the description!
So this was the idea (before | after):
Now, our wiki system is quite complicated. And we don't know if we want to add even more complexity to it. I basically tried to minimize the changes, and I made 3 commits that build upon each other, but are self-contained and can be run on their own.
Problem: The Youtube renderer renders links. But that isn't really useful for meta tag descriptions. This is somewhat solved by the 2nd commit.
Problem: All the big things like TOCs and Tabs are rendered at the start, which makes the meta tag description useless again.
Finally it looks good to me.
However
However, this is quite the complexity added. If this is too much or we want to implement it differently, maybe after a rewrite or refactor of wiki stuff, then this PR can be closed. I just wanted to try how much it really is, because I do enjoy the results:
More examples: