Now Reading
Writing HTML in HTML

Writing HTML in HTML

2024-01-11 21:07:28

I’ve simply completed the ultimate rewrite of my web site. I am
not mendacity: that is the final time I am ever going to do it.
This web site has gone via numerous rewrites – from
WordPress to Jekyll to a number of static website
mills of my very own – however that is the ultimate one. I do know
so, as a result of I’ve discovered the final word methodology for writing
webpages: pure HTML.

It sounds apparent, however when you concentrate on what number of
static website mills are being launched day by day – the list is
virtually infinite – it’s miles from apparent. Drew DeVault
not too long ago challanged
folks to create their very own weblog, and he did not even
point out the truth that one might write it in pure HTML:

If you would like a hosted platform, I like to recommend write.as. If
you are technical, you possibly can construct your personal weblog with
Jekyll or Hugo. GitHub presents free internet hosting for
Jekyll-based blogs.

Now, there’s nothing incorrect with Jekyll or Hugo; it is simply
fascinating that HTML does not even get a point out. And of
course, I am not criticizing Drew; I believe the work he is
doing is nice. However, similar to me and also you, he’s a baby
of his time.

That is why I am scripting this weblog put up – to show the tide
just a bit bit.


So what are the advantages of writing HTML in HTML?

There’s one much less stage of indirection.

This level is easy, however massively necessary.

Utilizing a static website generator signifies that you must
preserve monitor of two sources: the precise Markdown supply and
the ensuing HTML supply. This may occasionally not sound too
tough, however all the time having to make it possible for these two
sources are in step with one another takes a psychological toll.
Now, once I write in HTML, I solely should preserve monitor of one
supply.

Additional, you truly must have your static website
generator put in. Once more, not an enormous factor, however if you happen to
typically swap between completely different working techniques, that is
one more chore. With HTML, you simply want an internet browser
– which, if you happen to’re creating an internet site, you want anyway!

Lastly, you continually should work across the
limitations of your static website generator. As an instance you
need your website to have a particular listing construction,
the place pages are sorted underneath numerous classes. With
Jekyll, that is virtually inconceivable, and despite the fact that
you technically can get it working if you happen to actually
strive, it is just via a lot effort and with a supply code
that’s organized rather more unintuitively than if you happen to simply
wrote it immediately in HTML.

These seemingly small issues have a tendency so as to add up, and if you
know that there are three or 4 additional issues you must
take into consideration earlier than you write one other weblog put up, there is a
larger threshold to begin writing.

And that is one thing that I’ve observed: with nothing however
pure HTML, there isn’t a threshold. After I used
a static website generator, I all the time needed to do a dozen small
issues – begin the auto-refresh server, analysis find out how to do
one thing – earlier than I used to be able to do something. Now,
creating a brand new theme, a brand new put up, a brand new web page or perhaps a new
website requires no setup – I simply open up a HTML doc
and begin writing!

So what is the catch? There has be some
motive why folks do not write their private web sites in
pure HTML. Properly, it is easy:

HTML is disagreeable to jot down.

That is the one actual motive. And it is true – HTML is
a ache to jot down! However the answer, I argue, is not to make use of
different languages which can be then trans­lated to HTML (we have
seen above what number of issues that causes); the answer is
to make use of higher editors.

The most effective HTML editor I’ve discovered is definitely the WYSIWYG Composer
a part of Seamonkey.
So long as the supply is HTML 4.01 (which, for a private
weblog, is definitely adequate), it might probably edit any HTML
doc. It is what I am utilizing proper now to jot down this
put up, and regardless of its age and a few quirks, it really works
rather well.

Screenshot of SeaMonkey's Composer. Click for full size.

One other very promising various, which is not
WYSIWYG, however extra of a WYSIWYM editor, goes underneath
the title HTML
Notepad
.

If you don’t need a WYSIWYG editor, I am certain that fashionable
IDEs have affordable help for HTML.

See Also

In any case, when you begin writing a put up, you will discover
that it truly is not so dangerous, so long as you’ve gotten an
editor that’s extra fashionable than vi (no offense to
vi customers – I take advantage of it as my most important editor myself).

Doesn’t this imply that I’ve to sort a bunch of
boilerplate each time I create a brand new weblog put up?

My easy reply is: simply copy it. My extra superior
reply is that this:

  1. Make weblog posts and pages self-contained – in different phrases, have every put up or
    web page reside in its personal folder, with its personal scripts and stylesheets.
  2. If you need to write one other put up or web page, copy the
    folder of an already current put up or web page and edit it.
  3. In the event you discover the earlier step an excessive amount of work, write a
    shell script that copies the listing and removes the
    outdated content material for you.

However how can I then preserve the model and format of all my
posts and pages in sync?

Easy: do not! It is extra enjoyable that means. Take a look at this
web site: if you happen to learn any earlier weblog put up, you will discover
that they’ve a unique stylesheet. It is because
they had been written at completely different occasions. As such, they’re
like time capsules.

Replace (October 2020): I’ve now up to date the
design of your entire website (largely), as a result of some pages had model sheets that
trusted fashionable CSS options and had been incompatible with older
browsers – so you will not actually see any time capsules if you happen to discover the
website, not less than for now.

In abstract, I do not suppose this put up will persuade
everybody – and it isn’t written for everybody. It is written
for individuals who have discovered themselves in the identical state of affairs
as me: often rewriting their web site, combating with
their static website generator. For these folks, I believe
pure HTML is the only option.


Learn extra:
Response from Lobste.rs

Source Link

What's Your Reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top