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

No automatically generated excerpt #79

Open
dd32 opened this issue Aug 15, 2022 · 6 comments
Open

No automatically generated excerpt #79

dd32 opened this issue Aug 15, 2022 · 6 comments
Labels
[Component] Content Bugs or issues related to the page content i18n Translations, RTL issues

Comments

@dd32
Copy link
Member

dd32 commented Aug 15, 2022

Describe the bug
While testing #75 I discovered that since the content was moved from the editor, to the VCS-tracked pattern files, that WordPress no longer generates an excerpt for the pages.

This results in no description in the Opengraph tags, and no embed template text.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://wordpress.org/download/ with the new theme activated
  2. (optionally) Apply Add structured content to download page #75
  3. View source, observe empty description tags.

Expected behavior
The excerpt should be generated from the Pattern data, if not defined for the post.

Potential Solutions

  1. Define the excerpt on the Download page.
  2. ^ plus fallback should be generated from the Page Pattern content

Screenshots
Screen Shot 2022-08-15 at 1 16 48 pm
Screen Shot 2022-08-15 at 1 16 11 pm

@dd32
Copy link
Member Author

dd32 commented Aug 15, 2022

For now, I've set the page excerpt to that of the existing downloads page Download WordPress today, and get started on creating your website with one of the most powerful, popular, and customizable platforms in the world. as the auto-generated-from-pattern-data excerpt wasn't amazing: Get WordPress Everything you need to set up your site just the way you want it. Download and install yourself For anyone comfortable getting their own hosting and domain. Recommend PHP or greater and MySQL or MariaDB version or greater. Set up with a hosting provider For anyone looking for the simplest way to start. […]

@dd32 dd32 added the [Type] Question Needs input from others before actionable label Aug 15, 2022
@tellyworth
Copy link
Contributor

This sort of affects the front page too, except that it has some code to fall back to a default description.

Setting an excerpt on post pages seems like a fair solution for now.

Is there a saner way, going forward? If the content existed both in the post content and in the pattern files, would we get a usable auto-excerpt?

@dd32
Copy link
Member Author

dd32 commented Aug 15, 2022

If the content existed both in the post content and in the pattern files, would we get a usable auto-excerpt?

It doesn't look like it, based on my comment above.

I suspect this is a case where we should really just be forced to define the except for all hard-coded pattern pages, but I'm not sure how to do that.

If we're not going to use post_content as the source-of-truth for the page content, we probably shouldn't rely upon post_excerpt for the description either.. although it's acceptable for-now (which is why I went with it)

@ryelle ryelle added the [Component] Content Bugs or issues related to the page content label Aug 15, 2022
@ryelle ryelle moved this to 🛑 Pending discussion in WordPress.org Aug 15, 2022
@tellyworth
Copy link
Contributor

Given #100, maybe the solution to this is to have a special block in the post/pattern that specifies the meta description. (And the excerpt, if we're using excerpts for anything other than meta desc)

@ryelle
Copy link
Contributor

ryelle commented Aug 25, 2022

I've added what started as a proof of concept for the block idea over in WordPress/wporg-mu-plugins#253. It turned out better than I expected, though it doesn't do everything. I haven't put it in the milestone or asked for review since I don't know if that's the direction we want.

@ryelle
Copy link
Contributor

ryelle commented Dec 16, 2024

This hasn't really come up, but I noticed the description for most pages is just the English content (excerpt). I'm going to mark this as an i18n issue too.

Image

I just closed the block I made (from that comment 2yrs ago…), I think it would make more sense to either use the Jetpack SEO settings (and translate that), or figure out some way to get the processed pattern content and make an excerpt out of that.

Screenshot 2024-12-16 at 12 43 12 PM

@ryelle ryelle added i18n Translations, RTL issues and removed [Type] Question Needs input from others before actionable labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Content Bugs or issues related to the page content i18n Translations, RTL issues
Projects
Status: 🛑 Pending discussion
Development

No branches or pull requests

3 participants