Markdown Content file

I have a Markdown content file named captions.en.md in the same folder as my index.md within a Hugo page bundle for videos.

However, the Hugo build log shows:

DEBUG Set expanded permalink path for page resources\\videos\\youtube\\ymKlRonlUX0\\captions.en.md to "//resources/videos/"

This is causing captions.en.md to overwrite my video index page.

  • There is no front matter in captions.en.md.

Why is Hugo rendering this file?

According to Hugo’s page resources documentation, Markdown files in a page bundle should be treated as resources, not standalone pages.

What I’ve tried:

  • Renaming index.captions.en.md to captions.en.md.
  • Renaming to captions-en.md to avoid triggering multi-language processing.
  • Following a GPT suggestion to rename it to .index.captions.en.md, which also had no effect.

Issue in Context:

The debug log shows multiple caption files being set to //resources/videos/ across different video folders, which seems incorrect:

DEBUG Set expanded permalink path for page resources\\videos\\youtube\\-Mz9cH0uiTQ\\captions.en.md to "//resources/videos/"
...

This is not expected behaviour for page resources in Hugo.

Key Question:

Why is Hugo treating captions.en.md as a renderable page instead of a page resource, and how can I prevent this from happening within the structure of my NKDAgility.com Hugo site?

This directory doesn’t have an index.md file:

site/content/resources/videos/youtube/9zxymM9WMaU

Create one, with at least a title in front matter, and the problems goes away. Explanation…

permalinks:
  page:
    resources: /:sections/:slug/

Recommendations:

  1. Don’t use names like index.caption.en.md for page resources. Use caption.en.md instead.
  2. Use the --printPathWarnings flag when building your site.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

I have a bit of markdown content that I load into a page called “captions.en.md”. This file has no front matter and is supposed to be just content.

DEBUG Set expanded permalink path for page resources\videos\youtube\-Mz9cH0uiTQ\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\-pW6YDYEO20\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\-T1e8hjLt24\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\-xMY9Heanjk\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\-xrtaW5NlP0\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\00V7BJJtMT0\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\0fz91w-_6vE\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\1-jUmFcyiI8\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\1-W64WdSbF4\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\17qTGonSsbM\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\1AO6FFBlE4Y\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\1cZABFi7gdc\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\1ePkQeCVAlY\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\1M2_AVqoRbs\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\1TaIjFL-0o8\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\1VzbtRspOsM\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\2-AyrLPg-8Y\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\21k6OgxeKjo\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\220tyMrhSFE\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\221BbTUqw7Q\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\2_CowcUpzAA\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\2AJ2JHdMRCc\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\2ASLFX2i9_g\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\2cSsuEzGkvU\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\2Cy9MxXiiOo\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\2I3S32Sk8-c\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\2IuL2Qvvbfk\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\2k1726k9zvg\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\2KovKxNpZpg\captions.en.md to "//resources/videos/"

This overwrites the index file for “//resources/videos/”

I implemented changes suggested by jmooring on Markdown Content file - support - HUGO but to no avail.

All files have been renamed to “captions.en.md” and there are no longer any “resources\videos\youtube*” that do not have an index file. I feel like the logs are showing that hugo is trying to render “captions.en.md” and is defaulting to dumping it out to the nearest parent folder.

DEBUG Set expanded permalink path for page resources\videos\youtube\2I3S32Sk8-c\captions.en.md to "//resources/videos/"

Is there ea way to tell hugo not to render a resource and treat it only as a resource?

A link to the PR environemtne is on Fix by jmooring by MrHinsh · Pull Request #301 · nkdAgility/NKDAgility.com

When I clone and build your site using this command:

hugo server --source site --config hugo.yaml,hugo.local.yaml

This is what I see when I visit resources/videos:

Is that not correct?

(hangs head in shame)
yes…

I don’t understand.

I checked the logs and asumed that all the:

DEBUG Set expanded permalink path for page resources\videos\youtube\YGyx4i3-4ss\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\yKSkRhv_2Bs\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\ymKlRonlUX0\captions.de.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\ymKlRonlUX0\captions.es.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\ymKlRonlUX0\captions.fr.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\ymKlRonlUX0\captions.en.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\ymKlRonlUX0\captions.pl.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\ymKlRonlUX0\captions.pt.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\ymKlRonlUX0\captions.ru.md to "//resources/videos/"
DEBUG Set expanded permalink path for page resources\videos\youtube\ymKlRonlUX0\captions.zh.md to "//resources/videos/"

meant that I still had the problem and did not check the actual page was rendering correctly.

You were correct and this has been resolved.

I still don’t understand why! And I don’t understand why I still get the logs above.Unless the logs above an nothing to do with the issue.

If I were you I would spend some time cleaning this up:

WARN  Duplicate target paths: /learn/index.html (2), /resources/agile-project-management/index.html (2), /resources/agile-project-management/rss.xml (2), /resources/guides/the-evidence-based-management-guide-improving-value-delivery-under-conditions-of-uncertainty/data.index.classifications.json (2), /resources/guides/the-evidence-based-management-guide-improving-value-delivery-under-conditions-of-uncertainty/index.html (2), /resources/one-engineering-system-1es/index.html (2), /resources/one-engineering-system-1es/rss.xml (2), /resources/videos/1-critical-skill-for-a-scrum-master-and-why/data.captions.en.srt (3), /resources/videos/1-critical-skill-for-a-scrum-master-and-why/data.captions.json (3), /resources/videos/1-critical-skill-for-a-scrum-master-and-why/data.index.classifications.json (3), /resources/videos/1-critical-skill-for-a-scrum-master-and-why/data.json (3), /resources/videos/1-critical-skill-for-a-scrum-master-and-why/index.html (3), /resources/videos/best-scrum-advice-you-ever-received/data.captions.en.srt (2), /resources/videos/best-scrum-advice-you-ever-received/data.captions.json (2), /resources/videos/best-scrum-advice-you-ever-received/data.index.classifications.json (2), /resources/videos/best-scrum-advice-you-ever-received/data.json (2), /resources/videos/best-scrum-advice-you-ever-received/index.html (2), /resources/videos/building-a-culture-of-quality/data.captions.en.srt (2), /resources/videos/building-a-culture-of-quality/data.captions.json (2), /resources/videos/building-a-culture-of-quality/data.index.classifications.json (2), /resources/videos/building-a-culture-of-quality/data.json (2), /resources/videos/building-a-culture-of-quality/index.html (2), /resources/videos/code-reviews-for-quality-assurance/data.captions.en.srt (2), /resources/videos/code-reviews-for-quality-assurance/data.captions.json (2), /resources/videos/code-reviews-for-quality-assurance/data.index.classifications.json (2), /resources/videos/code-reviews-for-quality-assurance/data.json (2), /resources/videos/code-reviews-for-quality-assurance/index.html (2), /resources/videos/how-does-a-scrum-team-create-a-sprint-goal/data.captions.en.srt (2), /resources/videos/how-does-a-scrum-team-create-a-sprint-goal/data.captions.json (2), /resources/videos/how-does-a-scrum-team-create-a-sprint-goal/data.index.classifications.json (2), /resources/videos/how-does-a-scrum-team-create-a-sprint-goal/data.json (2), /resources/videos/how-does-a-scrum-team-create-a-sprint-goal/index.html (2), /resources/videos/how-does-the-lack-of-basic-skills-among-scrum-masters-impact-teams-and-organizations/data.captions.en.srt (2), /resources/videos/how-does-the-lack-of-basic-skills-among-scrum-masters-impact-teams-and-organizations/data.captions.json (2), /resources/videos/how-does-the-lack-of-basic-skills-among-scrum-masters-impact-teams-and-organizations/data.index.classifications.json (2), /resources/videos/how-does-the-lack-of-basic-skills-among-scrum-masters-impact-teams-and-organizations/data.json (2), /resources/videos/how-does-the-lack-of-basic-skills-among-scrum-masters-impact-teams-and-organizations/index.html (2), /resources/videos/how-will-a-psm-ii-course-challenge-your-assumptions-the-most/data.captions.en.srt (2), /resources/videos/how-will-a-psm-ii-course-challenge-your-assumptions-the-most/data.captions.json (2), /resources/videos/how-will-a-psm-ii-course-challenge-your-assumptions-the-most/data.index.classifications.json (2), /resources/videos/how-will-a-psm-ii-course-challenge-your-assumptions-the-most/data.json (2), /resources/videos/how-will-a-psm-ii-course-challenge-your-assumptions-the-most/index.html (2), /resources/videos/is-a-scrum-master-an-agile-micromanager/data.captions.en.srt (2), /resources/videos/is-a-scrum-master-an-agile-micromanager/data.captions.json (2), /resources/videos/is-a-scrum-master-an-agile-micromanager/data.index.classifications.json (2), /resources/videos/is-a-scrum-master-an-agile-micromanager/data.json (2), /resources/videos/is-a-scrum-master-an-agile-micromanager/index.html (2), /resources/videos/is-a-scrum-master-an-agile-project-manager/data.captions.en.srt (2), /resources/videos/is-a-scrum-master-an-agile-project-manager/data.captions.json (2), /resources/videos/is-a-scrum-master-an-agile-project-manager/data.index.classifications.json (2), /resources/videos/is-a-scrum-master-an-agile-project-manager/data.json (2), /resources/videos/is-a-scrum-master-an-agile-project-manager/index.html (2), /resources/videos/live-virtual-professional-agile-leadership-in-5-minutes/data.index.classifications.json (2), /resources/videos/live-virtual-professional-agile-leadership-in-5-minutes/data.json (2), /resources/videos/live-virtual-professional-agile-leadership-in-5-minutes/index.html (2), /resources/videos/most-valuable-lesson-you-learned-as-an-agile-consultant/data.captions.en.srt (2), /resources/videos/most-valuable-lesson-you-learned-as-an-agile-consultant/data.captions.json (2), /resources/videos/most-valuable-lesson-you-learned-as-an-agile-consultant/data.index.classifications.json (2), /resources/videos/most-valuable-lesson-you-learned-as-an-agile-consultant/data.json (2), /resources/videos/most-valuable-lesson-you-learned-as-an-agile-consultant/index.html (2), /resources/videos/part-2-most-influential-people-in-agile/data.captions.en.srt (2), /resources/videos/part-2-most-influential-people-in-agile/data.captions.json (2), /resources/videos/part-2-most-influential-people-in-agile/data.index.classifications.json (2), /resources/videos/part-2-most-influential-people-in-agile/data.json (2), /resources/videos/part-2-most-influential-people-in-agile/index.html (2), /resources/videos/scrum-doesn-t-solve-problems-it-reveals-them-how-and-why-is-that-valuable/data.captions.en.srt (2), /resources/videos/scrum-doesn-t-solve-problems-it-reveals-them-how-and-why-is-that-valuable/data.captions.json (2), /resources/videos/scrum-doesn-t-solve-problems-it-reveals-them-how-and-why-is-that-valuable/data.index.classifications.json (2), /resources/videos/scrum-doesn-t-solve-problems-it-reveals-them-how-and-why-is-that-valuable/data.json (2), /resources/videos/scrum-doesn-t-solve-problems-it-reveals-them-how-and-why-is-that-valuable/index.html (2), /resources/videos/technical-debt-management-for-long-term-quality/data.captions.en.srt (2), /resources/videos/technical-debt-management-for-long-term-quality/data.captions.json (2), /resources/videos/technical-debt-management-for-long-term-quality/data.index.classifications.json (2), /resources/videos/technical-debt-management-for-long-term-quality/data.json (2), /resources/videos/technical-debt-management-for-long-term-quality/index.html (2), /resources/videos/the-ghosts-of-agile-past-why-burndown-charts-might-be-holding-you-back/data.captions.en.srt (2), /resources/videos/the-ghosts-of-agile-past-why-burndown-charts-might-be-holding-you-back/data.captions.json (2), /resources/videos/the-ghosts-of-agile-past-why-burndown-charts-might-be-holding-you-back/data.index.classifications.json (2), /resources/videos/the-ghosts-of-agile-past-why-burndown-charts-might-be-holding-you-back/data.json (2), /resources/videos/the-ghosts-of-agile-past-why-burndown-charts-might-be-holding-you-back/index.html (2), /resources/videos/the-strategic-imperative-empowering-teams-with-vision-goals-and-direction/data.captions.en.srt (2), /resources/videos/the-strategic-imperative-empowering-teams-with-vision-goals-and-direction/data.captions.json (2), /resources/videos/the-strategic-imperative-empowering-teams-with-vision-goals-and-direction/data.index.classifications.json (2), /resources/videos/the-strategic-imperative-empowering-teams-with-vision-goals-and-direction/data.json (2), /resources/videos/the-strategic-imperative-empowering-teams-with-vision-goals-and-direction/index.html (2), /resources/videos/transform-your-software-team-with-expert-product-development-mentoring/data.captions.en.srt (2), /resources/videos/transform-your-software-team-with-expert-product-development-mentoring/data.captions.json (2), /resources/videos/transform-your-software-team-with-expert-product-development-mentoring/data.index.classifications.json (2), /resources/videos/transform-your-software-team-with-expert-product-development-mentoring/data.json (2), /resources/videos/transform-your-software-team-with-expert-product-development-mentoring/index.html (2), /resources/videos/what-is-a-sprint-goal/data.captions.en.srt (2), /resources/videos/what-is-a-sprint-goal/data.captions.json (2), /resources/videos/what-is-a-sprint-goal/data.index.classifications.json (2), /resources/videos/what-is-a-sprint-goal/data.json (2), /resources/videos/what-is-a-sprint-goal/index.html (2), /resources/videos/when-is-an-aps-course-appropriate-for-a-scrum-team/data.captions.en.srt (3), /resources/videos/when-is-an-aps-course-appropriate-for-a-scrum-team/data.captions.json (3), /resources/videos/when-is-an-aps-course-appropriate-for-a-scrum-team/data.index.classifications.json (3), /resources/videos/when-is-an-aps-course-appropriate-for-a-scrum-team/data.json (3), /resources/videos/when-is-an-aps-course-appropriate-for-a-scrum-team/index.html (3), /resources/videos/why-do-you-trust-joanna-to-deliver-scrum-org-classes-for-nkd-agility/data.captions.en.srt (2), /resources/videos/why-do-you-trust-joanna-to-deliver-scrum-org-classes-for-nkd-agility/data.captions.json (2), /resources/videos/why-do-you-trust-joanna-to-deliver-scrum-org-classes-for-nkd-agility/data.index.classifications.json (2), /resources/videos/why-do-you-trust-joanna-to-deliver-scrum-org-classes-for-nkd-agility/data.json (2), /resources/videos/why-do-you-trust-joanna-to-deliver-scrum-org-classes-for-nkd-agility/index.html (2), /resources/videos/worst-trait-in-unskilled-scrum-masters/data.captions.en.srt (2), /resources/videos/worst-trait-in-unskilled-scrum-masters/data.captions.json (2), /resources/videos/worst-trait-in-unskilled-scrum-masters/data.index.classifications.json (2), /resources/videos/worst-trait-in-unskilled-scrum-masters/data.json (2), /resources/videos/worst-trait-in-unskilled-scrum-masters/index.html (2)

I dont undersatnd how.

/resources/videos/1-critical-skill-for-a-scrum-master-and-why/data.json

There is only one file… no?

Indeed Ive checked a bunch of those file and there is only one file of each. Why would a duplicate target path be created?

1 Like

Ahhh. I see… multiple videos with the same name.

(shakes fist at marketing)

Not sure how I deal with that… perhaps I need to put the video code on the end…

You’ve got a lot going on here… slug, url, and aliases in front matter, plus all of the permalinks in your site config. There’s no way I’d be able to keep all of it straight.

1 Like

Yea, I have a lot of content that’s been around since 2006 and 4 sites ago with people linking to it.

I use powershell to generate all of the video files.

.powershell\build\Update-YoutubeMarkdownFiles.ps1

Im looking at folding that into my main one on

.powershell\single-use\resources\Update-ReourcesFrontMatter.ps1

I’m for sure going to go write something to fix the aliases…

I use a slug because hugo does not handle titles with a . in them… errors out as a directory

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.