StefMa / hugo-fresh

Hugo Fresh Theme
https://hugo-fresh.vercel.app
MIT License
621 stars 366 forks source link

How to include images and youtube videos in the additional single page #73

Closed sureshkvl closed 5 years ago

sureshkvl commented 5 years ago

Hi , I follow the "exampleSite/content/agb.md" for designing single page.

I would like to include images and youtube videos.

Question1: is there any custom tag for IMAGE and Videos, like below, {{% subtitle5 " My subtile" %}}

or should i use html tag?

Question2: Where i should i place the images?

Thanks suresh

nathanbiller commented 5 years ago

@sureshkvl There are standard hugo shortcodes. For youtube it should be:

{{< youtube w7Ft2ymGmfc >}}

They also explain how to handle images:

Input: {{< figure src="/media/spf13.jpg" title="Steve Francia" >}}

Output:

<figure>
  <img src="/media/spf13.jpg"  />
  <figcaption>
      <h4>Steve Francia</h4>
  </figcaption>
</figure>

"/media" would be referring to your "static/media/" folder I believe. I'd recommend putting all static content in the static folder.

Hope this helps :)

StefMa commented 5 years ago

Thanks for the explanation @nathanbiller! Closed as answered.