Questions tagged [hugo-content-organization]

21 questions
2
votes
1 answer

How to list sub folder of section on hugo

How to list the subfolders of sections on an HTML page in Hugo for now I use the list.html file of the section
2
votes
1 answer

Is it possible to use "sort of dynamic" pages using hugo?

I need sort of "dynamic" pages generated during build /id/1 /id/2 /id/3 /id/4 How to create a dynamic route? content/ --| id/ -----| _id.html --| index.html
Cem Kaan
  • 2,086
  • 1
  • 24
  • 55
2
votes
1 answer

Rendering posts from a particular category in Hugo

I started with Hugo but dont find good examples for customization. I need to render all posts in a category called e.g. "video" to show on main site within a template "list.html". How to change the code from term.html template to adress only this…
2
votes
1 answer

Range over posts in nested section in hugo

I use this code to show related posts in the same sections for posts in /content/posts. However, the code stops working when I move the content to a nested section, such as content/posts/news, resulting in content from other sections appearing.…
user17531463
2
votes
1 answer

Hugo: creation of a page that sends to a txt format

Bonjour ! I want to create a page that sends directly to a page in txt format, i.e. with a path like this: www.siteweb.fr/securite.txt The problem is that when I create a new security page > _index.md, I have this front matter: --- title:…
2
votes
2 answers

How can I have a different frontmatter for my about page in Hugo?

I'm using the PaperMod theme. I have the following params in my config.yml --- # some predefined variables params: ShowReadingTime: true ShowShareButtons: true ShowBreadCrumbs: true ShowCodeCopyButtons: true --- The params work as expected…
mfaani
  • 33,269
  • 19
  • 164
  • 293
1
vote
2 answers

Hugo Image Set Path

I'm new to Hugo, and having some trouble customizing a theme. This theme https://github.com/jpanther/congo takes advantage of Hugo Page Bundles to match a featured image string. I would like to re-purpose this "featured:" field from the frontmatter…
sosukeinu
  • 379
  • 4
  • 16
1
vote
1 answer

Hugo reference frontmatter image: in index.html

I have fontmatter that looks like --- title: "My First Post" date: 2023-04-07T22:11:00+02:00 draft: false slug: "hi-first-post" tags: ['tg1','tag2'] image: "images/featured.jpg" --- in my index.html I have {{ range .Site.RegularPages.ByDate.Reverse…
1
vote
1 answer

Hugo - multiple sections of website with their own local taxonomies?

I'm building a website that has "blog" section and and "guide" section, like this: mywebsite.com/blog/ mywebsite.com/guide/ Both blog and guide contain their own multiple posts. I'd like to add independent tags (taxonomies) to both blog and guide,…
user1548418
  • 457
  • 4
  • 14
1
vote
1 answer

hugo url content organization not working

error example file structure I'm using I am using the content organization guidelines described by the hugo website and it seems to not work whenever I run hugo server -D. any suggestions as to how I could get it to work? this is the structure…
m00nsh1n3
  • 11
  • 3
1
vote
1 answer

Deploy yml array with Hugo Statics

This is my first post on Stack Overflow, thanks in advance for your attention. i've been working on a project in which I need a Yaml file to load some information into cards. The site is made with Hugo and bootstrap 5. The structure is generated,…
1
vote
2 answers

How to use the same layout in a different directory?

I have a site using the hugo-coder theme, which has a layouts/posts folder that specifies that anything in the "posts" folder will have a blog post format. I would like to have two different blogs in two different subdirectories, using the same…
Paul
  • 10,381
  • 13
  • 48
  • 86
1
vote
2 answers

Calling variables inside Hugo partial

I have this code I use inside a partial in Hugo to pass context to it. {{- $ctx := . -}} {{- $curPage := .page -}} {{- $otherVar := .otherVar -}} {{- with $curPage -}} {{ $section := .CurrentSection }} {{ if .IsHome }}
user17531463
0
votes
1 answer

Trouble with Hugo Shortcode Variables affecting Table of Contents rendering

Title: Trouble with Hugo Shortcode Variables affecting Table of Contents rendering I am currently utilizing Hugo (https://gohugo.io/) to serve static documentation, and I've implemented a custom shortcode to incorporate variables within the text.…
Mohammad Siavashi
  • 1,192
  • 2
  • 17
  • 48
0
votes
1 answer

Image processing within range in Hugo

I'm trying to apply some image processing to an image I get from page's metadata. I have a range of posts and this works: {{ range sort (where .Site.Pages ".Params.layout" "playlist") ".Params.sort" }}
r3bl
  • 260
  • 5
  • 15
1
2