Code Monkey home page Code Monkey logo

Comments (9)

panr avatar panr commented on May 28, 2024

Did you wrap front matter in:

---
// your code
---

?

Just tested YAML syntax on my own setup and it works fine 🤔

from hugo-theme-hello-friend.

panr avatar panr commented on May 28, 2024

Oh... I see that in your example you're using image tag, but you should use images (as I mentioned on Twitter, it's an array / list of items)

from hugo-theme-hello-friend.

Fastidious avatar Fastidious commented on May 28, 2024

@panr I have tried both ways. Real YAML:

---
date: "2019-04-25T18:38:42-04:00"
title: "I Am Sorry I Was Late"
description: "Sadly, despite my best efforts, I was ten minutes late. Please forgive me, Mrs. Lamorte."
cover: "/resources/2019-04-25-i-am-sorry-i-was-late.png"
images:
  - "/resources/2019-04-25-i-am-sorry-i-was-late.png"
categories:
  - personal
tags:
  - kent
  - images
---

Render snippet:

<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="http://localhost:1313/"/>

<meta name="twitter:title" content="Site Name"/>
<meta name="twitter:description" content="Blog of a carbon based life-form, as unique as everyone else"/>



<meta property="og:title" content="Site Name" />
<meta property="og:description" content="Blog of a carbon based life-form, as unique as everyone else" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://localhost:1313/" />

<meta property="og:image" content="http://localhost:1313/" />

<meta property="og:updated_time" content="2019-07-28T16:56:28+00:00" /><meta property="og:site_name" content="Site Name" />

Notice that the description and title are not being used either. In this case, "Site Name", and "Blog of a carbon based life-form, as unique as everyone else" are on the config.toml, but they should have been overwritten by YAML entries.

from hugo-theme-hello-friend.

panr avatar panr commented on May 28, 2024

Strange... it should work out of box...

from hugo-theme-hello-friend.

Fastidious avatar Fastidious commented on May 28, 2024

I forgot to add I am using Hugo v0.56.

from hugo-theme-hello-friend.

panr avatar panr commented on May 28, 2024

I really don't know what's going on with your setup, but I updated Hugo to 56.1 (latest). With this front matter:

---
title: "Test"
date: "2019-07-08T16:45:00+02:00"
author: "Lorem Ipsum"
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam nec interdum metus. Aenean rutrum ligula sodales ex auctor, sed tempus dui mollis. Curabitur ipsum dui, aliquet nec commodo at, tristique eget ante."
images:
  - "img/hello.jpg"
---

my <head> looks like this:

image

So as far I know, version doesn't matter here...

from hugo-theme-hello-friend.

Fastidious avatar Fastidious commented on May 28, 2024

@panr how your config.toml looks like?

from hugo-theme-hello-friend.

Fastidious avatar Fastidious commented on May 28, 2024

@panr I am an idiot. I was looking at the source of the post, while paginated! (which will never work) 🤦🏻‍♂️ Single post works as intended. Sorry for the waste of time, off I go to kick myself.

from hugo-theme-hello-friend.

panr avatar panr commented on May 28, 2024

I'm glad it works 😅

from hugo-theme-hello-friend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.