Featue: support for meta embeds #1922

Closed
opened 2026-02-05 02:13:00 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @codemicro on GitHub (Oct 28, 2020).

Describe the feature you'd like
Currently, BookStack has no support for meta embeds that are commonly used on social media sites, similar to this:

DiscordPTB_2020-10-25_23-25-41

Perhaps this is something that would fit into BookStack? For example, the meta embed for a page of text could contain info like the page title, the first image (if any) in it, and a small amount of the content. The embed for a book could show its cover image and some info about the pages inside of it. Et cetera, et cetera.

Currently, the only option is to use some custom header content, which results in a fixed embed for every page.

Describe the benefits this feature would bring to BookStack users
This gives BookStack links that're shared on services like Discord and Twitter more credibility and makes them look a bit better... okay, it's basically entirely an aesthetical thing. You have to admit they do look nice, though.

Additional context
CSS tricks: The Essential Meta Tags for Social Media
The Open Graph protocol
Example meta tags from my site:

<meta name="description" content="UK based student and programmer">
<meta property="og:title" content="Thomas Pain">
<meta property="og:site_name" content="tdpain.net">
<meta property="og:description" content="UK based student and programmer">
<meta property="og:url" content="https://www.tdpain.net/">
<meta property="og:image" content="https://cdn.tdpain.net/avatar.png">
Originally created by @codemicro on GitHub (Oct 28, 2020). **Describe the feature you'd like** Currently, BookStack has no support for meta embeds that are commonly used on social media sites, similar to this: ![DiscordPTB_2020-10-25_23-25-41](https://user-images.githubusercontent.com/25284325/97381810-c8b51f00-18c1-11eb-9872-d8ca9a94b1fd.png) Perhaps this is something that would fit into BookStack? For example, the meta embed for a page of text could contain info like the page title, the first image (if any) in it, and a small amount of the content. The embed for a book could show its cover image and some info about the pages inside of it. Et cetera, et cetera. Currently, the only option is to use some custom header content, which results in a fixed embed for every page. **Describe the benefits this feature would bring to BookStack users** This gives BookStack links that're shared on services like Discord and Twitter more credibility and makes them look a bit better... okay, it's basically entirely an aesthetical thing. You have to admit they do look nice, though. **Additional context** [CSS tricks: The Essential Meta Tags for Social Media](https://css-tricks.com/essential-meta-tags-social-media/) [The Open Graph protocol](https://ogp.me/) Example meta tags from my site: ```html <meta name="description" content="UK based student and programmer"> <meta property="og:title" content="Thomas Pain"> <meta property="og:site_name" content="tdpain.net"> <meta property="og:description" content="UK based student and programmer"> <meta property="og:url" content="https://www.tdpain.net/"> <meta property="og:image" content="https://cdn.tdpain.net/avatar.png"> ```
OVERLORD added the 🔨 Feature Request🏭 Back-End labels 2026-02-05 02:13:00 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 13, 2020):

Thanks for the request with clear details @codemicro.

I’d be very much open to having something like this within BookStack. There have been prior similar requests but they have all requested additional controls to set such tags with custom values. As long as this was based on existing content instead of into reducing additional inputs, this would be something I’d be happy to be within the platform.

@ssddanbrown commented on GitHub (Nov 13, 2020): Thanks for the request with clear details @codemicro. I’d be very much open to having something like this within BookStack. There have been prior similar requests but they have all requested additional controls to set such tags with custom values. As long as this was based on existing content instead of into reducing additional inputs, this would be something I’d be happy to be within the platform.
Author
Owner

@codemicro commented on GitHub (Nov 13, 2020):

Hi Dan!

Great news! I don't think there should necessarily be any extra configurable options just for the meta embeds, I imagine the existing data that exists would be plenty to populate one.

I'd submit a PR for it, but unfortunately I don't know PHP at all well. Go is more my thing.

@codemicro commented on GitHub (Nov 13, 2020): Hi Dan! Great news! I don't think there should necessarily be any extra configurable options just for the meta embeds, I imagine the existing data that exists would be plenty to populate one. I'd submit a PR for it, but unfortunately I don't know PHP at all well. Go is more my thing.
Author
Owner

@james-geiger commented on GitHub (Dec 3, 2020):

Hey @ssddanbrown, been quiet a while but can pick this one up if you've not started on it already.

@codemicro This is a really well documented issue, so I think there's a good place to start. Are there any tags that would be "must haves" versus just "helpful" for the content types: Shelf, Book, Chapter, and Page?

@james-geiger commented on GitHub (Dec 3, 2020): Hey @ssddanbrown, been quiet a while but can pick this one up if you've not started on it already. @codemicro This is a really well documented issue, so I think there's a good place to start. Are there any tags that would be "must haves" versus just "helpful" for the content types: Shelf, Book, Chapter, and Page?
Author
Owner

@codemicro commented on GitHub (Dec 4, 2020):

For shelves and books, I think they should at least show the title, description and image if they're set. I'm not familiar enough with chapters to say anything regarding that, but for a page the title and a preview of the text would be pretty important in my opinion. Maybe also the first image in the document if there is one, too.

Thanks for taking the time to make a PR @james-geiger!

@codemicro commented on GitHub (Dec 4, 2020): For shelves and books, I think they should at least show the title, description and image if they're set. I'm not familiar enough with chapters to say anything regarding that, but for a page the title and a preview of the text would be pretty important in my opinion. Maybe also the first image in the document if there is one, too. Thanks for taking the time to make a PR @james-geiger!
Author
Owner

@ssddanbrown commented on GitHub (Dec 12, 2020):

@james-geiger Yeah, absolutely, Go ahead! I have not started anything myself.

I agree with @codemicro in regards to scope, keep it simple with title and preview text and maybe an image if easy to fetch.

@ssddanbrown commented on GitHub (Dec 12, 2020): @james-geiger Yeah, absolutely, Go ahead! I have not started anything myself. I agree with @codemicro in regards to scope, keep it simple with title and preview text and maybe an image if easy to fetch.
Author
Owner

@ssddanbrown commented on GitHub (Jun 23, 2021):

PR #2393 now merged for next release to bring a basic core implementation. Thanks @codemicro and @james-geiger!

@ssddanbrown commented on GitHub (Jun 23, 2021): PR #2393 now merged for next release to bring a basic core implementation. Thanks @codemicro and @james-geiger!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1922