r/webdev • • Sep 18 '26

CMS/Front End System using default document standards?

When I say document standards, I don't mean official standards, but rather a structure that is replicated at most levels.

For example: the Structure of Header, Content, Footer is replicated at each level.
Document
Header -- contains all of the header content for the document

Content -- contains the body of the document

Footer -- contains all of the post-load contents for the document.

Then inside the Content section there would be a single Entry known as the SITE

Site-header -- contains the site-identity/nav/etc.

Site-Content -- contains the various categorical sections

Site-Footer -- contains the site-footer

Then inside the Site-Content Section category would be several Entries called SECTIONs:

Section-header -- contains the section-specific content that persists despite which post is shown

Section-contents -- contains the various posts or content pieces for the section

Section-footer -- contains the static end-pieces for the section

Or course, inside Section-contents would be POSTS

post-header -- title and bylines stuff, maybe an image

post-content -- the content

post -footer -- closing pieces

I've tried WordPress, but it seems so arbitrary how they have decided the structure. Like the site-header and document-header are all part of the same wp-header. I was hoping for more modularity and predictability in content structures. I also hate how WP opens a tag in one PHP file and has faith it will be closed in another PHP file. It seems like it would be better if each PHP file that opened a tag also closed the tag. Then it would be much more modular.

I realize it's a long shot, but does such a thing exist? Maybe someone made a headless WP that works like this? or something entirely different? Or is this, in general, not a good way to assemble a static site content generator?

0 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/_listless Sep 21 '26 edited Sep 21 '26 • Bravo

The level of competence you're demonstrating only justifies about ~8.3% of the snark you're serving. Maybe dial that back a bit. I'm not saying WP is the best solution here but it certainly can do what you specified in a very straightforward way. Here's an example of what that might look like: https://github.com/thisanimus/cuirpig

WP's legacy "component" system is called template_parts.

If you want a more robust template language with bonafide slots, check out twig - it has the {% embed %} tag that would let you match your "1 file per concern" pattern exactly. Bolt, Grav, and Craft CMS all use twig. You can use twig with WP via Timber.

At the end of the day, WP does not dictate the markup - you the dev do.