I'm also making my own site, and what I noticed is that we have two main components that make up a site: Layout and content.
If we really really want to deep dive into this, you can divide things up even further...
HTML has 3+1 categories of elements that are possible:
- structural (shit like div, span, p, etc...tells the browser about the structure of the document)
- semantic (tells the browser what something is, like quote, h1, etc)
- (deprecated) presentational (used to tell the browser how shit looks)
- (lol, pls don't) non-standard (does whatever you make it do in CSS; sorta reinvents non-existent presentational tags; best use case is really to re-invent the <blink> tag using CSS animations)
Since we're on this side of 1999, presentational elements are no longer really to be used, and instead CSS should be used. In radical cases, it should be the only thing used for presentation. CSS zen garden shows a good example of this:
https://www.csszengarden.com/
The site's HTML only applies structure and semantics; all of the other stuff for each layout is 100% CSS.
So: HTML for structure/semantic labelling, CSS for presentation.
From here, we can talk about web application architecture.
In a modern web app, we can think of there being three layers (you can also have multiple tiers, but that's has to do with how many machines are actually hosting the layers):
- the application layer -- i.e. the client side stuff that presents the content to the user. This would be HTML/CSS, but also things like your JS, historically flash, etc. Note that even with scripts, all the client actually receives is the final HTML/CSS output, which should be the brainchild of the UX designer, not the PHP dev or whoever.
- the logic layer -- i.e. your scripts. These take input from the database layer and output to the application layer.
- the database layer -- This stores the content that gets formatted by the logic layer and displayed by the application layer.
Obviously, in this model, your raw content needs to be segregated away from the other elements of the website -- it isn't the structure or presentation, it isn't logic, and it isn't the database. It has to be able to pass through all of these layers and readily be processed by each, but it isn't any single one of them. It's just something that gets used and processed by the others.
Keeping this segregation also has the benefit of creating distinct and efficient workflows for each task:
- the content creator can focus on the most efficient means to make content
- the UX designer can focus on making the best looking front end
- the PHP dev can focus on making efficient code
- the database architect can focus on optimizing data structures queries so that the backend is fast
Now then, for a personal site, you're obviously going to be wearing all of these hats, but by compartmentalizing these items thusly, you end up having 4 very efficient workflows rather than one big clusterfuck process that stifles your ability to get anything done and leads to the project getting abandoned like so many "under construction" neocities sites.
With static sites, we obviously don't have the same tech stack to make this so efficient, but we can still perform the same compartmentalization. We should have the goal to create structures that:
1. seperate the content from the architecture.
2. present request options and retrieval output to the user
3. process retrieval requests and retrieve the content
4. store the content in a regular manner that allows it to be retrieved
In static-land, we can devise some crazy ersatz structures to accomplish this for us:
1. can be accomplished by simply isolating your content entirely from the rest of the site's structures. For example, if you have a blog, your article content should ONLY consist of the html elements necessary for structuring a document like paragraphs, headings, tables, lists, images, etc. You could even go further; for example, I write all of my content in markdown (which is much faster than HTML to draft with, and so results in a shorter turn around for article writing), and in static-land, I'd simply export as HTML and end up with a document that consists of NOTHING other than the necessary <p>s and <h1>s and suchlike that's needed for structuring the document.
2. can be accomplished by simply doiing what you do for front end design. HTML/CSS, JS, or whatever else.
3. This can be accomplished by incorporating frames (oldschool but might break in the near future and isn't as good for segregating the different layers of this framework) or iframes (modern, and much better to incorporate into an HTML/CSS layout that's segregated from this layer) into site with some cleverly designed navigation and sub-navigation tables. You can see inklings of this way of thought even in old sites. For example, H.R. Giger's official site (which hasn't had it's layout update in decades) is a classic frameset site that has a navigation frame and a content frame.
https://hrgiger.com/ Like most old sites, it blends sub-navigation with content, which I'd say could be improved on, but it hits the nail on the head as an example of what I'm on about -- you have a system of requesting very simple, segregated content pages and then it displays them without the content necessarily being part of the structure of the site (they are because the content on that site uses the content pages as sub-navigation, but whatever).
4. is simply whatever regular conventions you decide to use to structure your www-root and it's sub folders to store the content in a way that's predictable.
Doing it this way is ad-hoc and goofy, but so is eschewing server-side technology... but it would work and still let you have the efficient workflows necessary to streamline site operations and content production.
Sorry if this is a bit rambly and even possibly useless, but this stuff has been on my mind a lot recently lol.