A static blog & iframes: Should I?

Viewed 12

I would like to create a simple Web Log for myself - the deal is, I want to do it from the ground up and without using any modern toys like static site generators, CMS'es, or even libraries if possible. Preferably, I'd like it to be static - as simple as it goes: each blog post is a .html file. I'm a beginner in web dev, and I'd like it to double as practice.

Now, my first idea was to simply plop each post as a .html page using some kind of a template [so I'd have blogname.com/post1.html, blogname.com/post2.html etc.]

The problem is, there will be elements that will be the same for all posts - maybe a banner, a back button, a footer and such. This means, if I decided to change any of those a year from now, I'd have 300+ files to edit out, either by hand or a script.

I have looked around and thought about dividing the page into several parts: there would be a main page, with banners, footers and such, and inside it would load up the .html of a given post - naturally, the first thing I researched was iframes [and then objects and embeds], and here's the problem:

  • For iframes, 90% of google hits are along the lines of "DON'T USE IFRAMES, IFRAMES WILL KILL YOUR WEBSITE AND BURN YOUR HOUSE", stating it's outdated technology, full of holes and vulnerabilities, slowing down the website and such "better use objects and embeds" they say
  • On the other hand, when I check the embed or object docs and such, there's usually a "it's better to use iframes than this" somewhere below

I'm stuck in a loop - when I read up on iframes, they say it's evil and I should use objects/embeds, and when I research the later, it says THOSE are evil and I should use iframes instead. What. The. Hell.

Which of those would be the best for my case? Or is there something else I should use?

Another idea is to have a single post in a separate .html file, and things that I might want to change for ALL the posts would be loaded by a simple JS script from a file [so if I have to for example change the footer, I'd edit it in the file and it would just be loaded into each post from there] - not sure how viable that would be. I could just hack it away somehow, but I worry about google crawlers and such being unable to access some parts of the blog.

I'd like to have it as basic as possible for starters, but with a way to expand later on, and without using any engines and such. Any ideas?

0 Answers
Related