Git Product home page Git Product logo

Comments (8)

JugglerX avatar JugglerX commented on June 16, 2024 1

Both the homepage and about us page are both content managed now.

  • The "Home" page uses multiple markdown files for the different homepage sections. It uses headless bundles.
  • The "About Us" page uses multiple markdown files for its different sections. It uses leaf bundles and shortcodes.

from hugo-hero-theme.

JugglerX avatar JugglerX commented on June 16, 2024

Yes there is some hardcoded text in the theme, but then again the hero images are driven by front-matter and both services and work are all fully markdown driven.

So actually it's mainly the Homepage and About Us pages that have hardcoded text areas. These pages have more free flowing designs where content is in multiple sections, and you can't really split a single markdown file to achieve these designs. I see no problem with using a mixture of html and markdown to drive the content here. There is no anti-pattern, just balancing of needs.

It would be easy enough to fix this if it's a problem for you, but it may impact the design. Just edit the index page and about us pages and insert the markdown {{ .Content }} and delete the hardcoded sections. You could also use JSON files from the data directory to drive the secondary sections instead of deleting them.

Thanks for your feedback

from hugo-hero-theme.

onedrawingperday avatar onedrawingperday commented on June 16, 2024

These pages have more free flowing designs where content is in multiple sections, and you can't really split a single markdown file to achieve these designs.

@JugglerX
You can do the above using Page Resources for the index page or even config parameters that you call in the index page template.

I also think that you need to rethink the hard coded text approach.

You need to give users an easy way to customize these text fields.

from hugo-hero-theme.

JugglerX avatar JugglerX commented on June 16, 2024

I'd be keen to see an example of the Page resources approach. It would be nice if all the content for the index is bundled in the same content area.

Putting page content in the config parameters doesn't feel right. At least not large sections or paragraph text.

from hugo-hero-theme.

onedrawingperday avatar onedrawingperday commented on June 16, 2024

I will send a Pull Request about this issue when I can.

from hugo-hero-theme.

JugglerX avatar JugglerX commented on June 16, 2024

I did a bit of work today, i managed to turn the about us page into a leaf branch and bring in the full-widths strips using Page resources and short codes. Not sure if it's the best approach, seems like there could be a few architecture options. Keen to see how you handle it.

Had some wierd issues with the template lookup flipping between a single and section list template.

from hugo-hero-theme.

onedrawingperday avatar onedrawingperday commented on June 16, 2024

@JugglerX

Had some wierd issues with the template lookup flipping between a single and section list template.

index.md --> Leaf bundle controlled by the template under /layouts/_default/single.html
_index.md --> Branch bundle controlled by the template under /layouts/_default/list.html

See the Doc

PR sent. If you have any further questions do not hesitate to ask.

from hugo-hero-theme.

JugglerX avatar JugglerX commented on June 16, 2024

@scarby I merged the PR from @onedrawingperday and you can see how he has converted the index page to use multiple markdown files. Hope that helps. I'll try and convert the about us page over sometime this week anyway, but I'm back at work this week so wont be quite as active.

from hugo-hero-theme.

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.