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

Social media image preview #140

Open
wipfli opened this issue Mar 20, 2023 · 7 comments
Open

Social media image preview #140

wipfli opened this issue Mar 20, 2023 · 7 comments

Comments

@wipfli
Copy link
Contributor

wipfli commented Mar 20, 2023

When posting links to news articles on social media, the platforms often show a post preview image. But for us this is always the same image. Would be cool if we could have a different image for each article. In the past I sometimes deleted the default image but linkedin basically does not show posts without an image... So for now I past the image manually but would be cool if we could set dynamically what goes into the header. The relevant section is probably this one:

<meta property="og:image" content="/img/share-image.png" />
<meta property="og:image:width" content="1024" />
<meta property="og:image:height" content="512" />
<meta property="og:image:alt" content="MapLibre" />
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:description" content="{{ .Params.description }}" />
<meta property="og:url" content="{{ .Permalink | absURL }}" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@maplibre" />
<meta name="twitter:creator" content="@maplibre" />
<meta name="twitter:title" content="{{ .Title }}" />
<meta name="twitter:description" content="{{ .Params.description }}" />
<meta name="twitter:image:src" content="/img/share-image.png" />
<meta name="twitter:image:alt" content="MapLibre" />

@louwers @maxammann do you know how we could do this?

@HarelM
Copy link
Collaborator

HarelM commented Mar 20, 2023

og:image is the source of the image basically. It should change according to the page content.
We can/should use a platform that allows writing content instead of rolling out our own such as WordPress or Medium, IMHO.
Note that there are strict copyright law in regards to images, so we should be careful when adding those...

@louwers
Copy link
Collaborator

louwers commented Mar 20, 2023

We can pull the image from the YAML frontmatter. Should be relatively uncomplicated.

I would stick to a static site generator. The only reason to use a CMS for a blog or website in my eyes if non-developers need to contribute to it.

@maxammann
Copy link
Contributor

Easily possible if we supply the image to display. Not so easy if we want to generate images.

@wipfli
Copy link
Contributor Author

wipfli commented Mar 20, 2023

I am happy to explicitly set the image path in every news article.

@HarelM
Copy link
Collaborator

HarelM commented Mar 20, 2023

The only reason to use a CMS for a blog or website in my eyes if non-developers need to contribute to it.

I can't express how deeply I disagree with this statement 😃.
The reason we are maintaining a site here with all the issues we find and take time to solve is a complete waist of a lot of time...
When you write a blog post in medium for example images are suggested, the style is well defined and easy to have pages look the same, SEO it's out of the box, it will suggest content to others users and so on and so on. It's a lot less work than what we do here with a lot more value.
I'm very technical, and I would still suggest to write blog posts in meduim instead of here in general...

@louwers
Copy link
Collaborator

louwers commented Mar 20, 2023

I really like the website. It's simple and loads fast. We are in full control. It is hosted under our own domain. Changes are transparant thanks to pull requests. The issues are also not that time consuming now that it is up and running? Also as a free and open source community I would not want to use propietary software if it can be avoided. My 2 cents.

@wipfli
Copy link
Contributor Author

wipfli commented Mar 20, 2023

Let's not worry too much about the format. I think the most important thing is that our website presents who we are and what we do to people that want to learn more about MapLibre.

The news section on one hand distributes updates about what is going on, but more importantly, it also shows that something is going on...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants