Coder Social home page Coder Social logo

Comments (6)

leahoswald avatar leahoswald commented on June 10, 2024 1

Ah your right, this was a wrong observation either due to caching or changing path names. (It was late yesterday)

from hugo.

jmooring avatar jmooring commented on June 10, 2024

It would be helpful if you could share your project with us. I am unable to recreate the problem based on the description above.

from hugo.

leahoswald avatar leahoswald commented on June 10, 2024

And now, just to be sure, I changed the folder name from "artProject" to only "art" and it magically works. And I can reproduce it! If the folder name is only lowercase it works, if it contains an upper case it is ignored. Is there any naming scheme I couldn't find in the docs?

EDIT: Updated the original issue to reflect this issue.

from hugo.

jmooring avatar jmooring commented on June 10, 2024

With this content structure:

content/
└── TestDir/
    └── p1.md
Value returned by v0.122.0 Value returned by v0.123.0
{{ .Section }} TestDir testdir
{{ .Type }} TestDir testdir

Which means you can't do this anymore:

layouts/
└── TestDir/
    └── single.html

I'm guessing that both Type and Section are now derived from the logical path (described here) instead of the physical path.

I'm not sure if this is one of the intentional breaking changes in v0.123.0. Regardless, change your layouts structure to:

layouts/
└── testdir/
    └── single.html

from hugo.

leahoswald avatar leahoswald commented on June 10, 2024

Sounds plausible that it is caused by the function because copying the folder from layouts to the templates layouts folder doesn't help. So it seems to be a global problem. If it is intended and only lowercase is allowed now we should add some documentation for it.

Oh and it doesn't help to just rename the layout folder to a lowercase version, we need to rename the content structure too.

from hugo.

jmooring avatar jmooring commented on June 10, 2024

it doesn't help to just rename the layout folder to a lowercase version

Yes, it does, try it.

git clone --single-branch -b hugo-github-issue-12398 https://github.com/jmooring/hugo-testing hugo-github-issue-12398
cd hugo-github-issue-12398
hugo server

Then visit http://localhost:1313/testdir/p1/

from hugo.

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.