TASVideos / tasvideos

The code for the live TASVideos website
https://tasvideos.org/
GNU General Public License v3.0
63 stars 29 forks source link

Put Wiki Content into Open Graph Descriptions #1896

Closed Masterjun3 closed 4 days ago

Masterjun3 commented 5 days ago

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): image

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: image image image

Masterjun3 commented 5 days ago

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.

Masterjun3 commented 4 days ago

Those commits should do it.