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

Improve SEO features #1218

Closed
6 tasks done
tidyui opened this issue Jun 1, 2020 · 12 comments
Closed
6 tasks done

Improve SEO features #1218

tidyui opened this issue Jun 1, 2020 · 12 comments

Comments

@tidyui
Copy link
Member

tidyui commented Jun 1, 2020

The following fields should be provided out of the box

Basic

  • Meta title - default value main title
  • Meta keywords
  • Meta decription

Open Graph

  • OG Title - default value meta title, then mail title
  • OG Description - default value meta description
  • OG Image - default value primary image

Should there be more fields? If so please comment below

@biapar
Copy link

biapar commented Jun 1, 2020

TWITTER cards, canonical url

@tidyui tidyui added the request label Jun 5, 2020
@tidyui tidyui added this to the Version 8.4 milestone Jun 5, 2020
@tidyui tidyui closed this as completed Jun 5, 2020
@tidyui tidyui reopened this Jun 5, 2020
@jbrozek
Copy link

jbrozek commented Jun 14, 2020

Alt tag on image blocks

@tidyui
Copy link
Member Author

tidyui commented Jun 14, 2020

@jbrozek The image block just refers an image in the media library which has a field for alt text (added in 8.1)

Regards

@danielshue
Copy link

If this hasn’t been done, I’ll be happy to make the change.

@tidyui
Copy link
Member Author

tidyui commented Jul 4, 2020

Hi @danielshue! No this hasn't been implemented yet! It's basically about adding some fields to Pages & Posts and updating the Settings modal for both types of content!

@tidyui
Copy link
Member Author

tidyui commented Jul 4, 2020

@danielshue We're always happy for contributions, so feel free to join in! Much appreciated

@danielshue
Copy link

Great! I'll give it a go!

@danielshue
Copy link

@tidyui

The Open Graph Protocol - https://ogp.me has a number of supported attributes. The minimum values appear to be:

og:title - The title of your object as it should appear within the graph, e.g., "The Rock".
og:type - The type of your object, e.g., "video.movie". Depending on the type you specify, other properties may also be required.
og:image - An image URL which should represent your object within the graph.
og:url - The canonical URL of your object that will be used as its permanent ID in the graph, e.g., "http://www.imdb.com/title/tt0117500/".

Do we want to support the additional properties available for image such as image:type, image:width, image:alt, and image:height?

If an image isn't provided, it seems like using the Piranha logo seems like a natural choice.

@tidyui
Copy link
Member Author

tidyui commented Jul 7, 2020

@danielshue Well these were my initial thoughts.

  • og:title - This should default to the new MetaTitle, then Title if not set
  • og:description - This should default to MetaDescription if not set
  • og:image - This should default to PrimaryImage if not set

As for og:type I haven't really thought about it. Either it could be up to the Razor Page / View rendering the page/post or we could add a property for this. But then maybe there should also be a property available on PageType and PostType so you can set a default value for this type of content, for example if you create a ProductPost you could set it to something relevant to this.

Regarding meta information about the selected image this can probably be collected from the media object as this will contain all of these fields.

What do you think?

@tidyui
Copy link
Member Author

tidyui commented Jul 7, 2020

@danielshue And when I wrote that it should default to other fields, I think a good solution is to just show the default values as placeholder in the input fields in the manager. Then we can always add helper methods in the package Piranha.AspNetCore to help render the meta tags if the developer wants to use it.

@tidyui
Copy link
Member Author

tidyui commented Jul 11, 2020

@danielshue Added first version of helper for rendering meta-tags. See the commit above

@tidyui
Copy link
Member Author

tidyui commented Jul 18, 2020

@danielshue Just so I know, are you looking at this issue. I'm thinking about starting with #1000 which also requires Db migrations and sometimes it can get a bit messy when trying to merge migrations from several branches.

@tidyui tidyui closed this as completed in 3eaf4bb Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants