Comments (8)
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.
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.
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.
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.
I will send a Pull Request about this issue when I can.
from hugo-hero-theme.
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.
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.
@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)
- Drop-down menu in Hero HOT 1
- Bug: Permalink and RelPermalink are generating malformed URLs in build output (theme-specific) HOT 2
- Copyright text bad HOT 3
- Make business hours and phone number labels optional
- google font entry in config.toml not taking effect HOT 1
- History page not populating properly
- GDPR compliancy with cookies
- Lists show no number or bullet HOT 4
- how to configure my image for the background ?
- Landscape error just in homepage HOT 2
- features.json file does not appear to be used in hero theme HOT 1
- Sticky navbar HOT 1
- social links? et cetera HOT 1
- -
- Numbered and bulleted lists not showing numbers or bullets HOT 1
- Hugo Hero Theme on mobile devices HOT 1
- Getting error when building: failed to extract shortcode: template for shortcode "content-stip-left" not found HOT 6
- Hard-coded "Our Services" in index template HOT 1
- Netlify needs netlify.toml modified if you do a cp -a from exampleSite
- Renaming of "services" and "work" sections
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo-hero-theme.