I am new to web development and I would like to know how to make an xkcd style comic website specifically the structure. xkcd.com has a separate folder for each comic with an index.html inside, but it seems like a lot of repetition to copy the almost exact same index file into every folder. Is there a more intelligent way to do this?

I don't want to use websites like Wordpress.

closed as too broad by Stephen Ostermiller May 13 at 10:18

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • There are hundreds of platforms, programming languages, libraries, and techniques that could be used. "How do I build a web site" is not a question that can be answered in a few paragraphs without introducing biased opinions. – Stephen Ostermiller May 13 at 10:19

Mmm, I don't think that's the way Randall (creator of xkcd) post his comics.

It seems that you believe that this is his way because you learned that the 2148 of that URL https://xkcd.com/2148/ is a folder on the server, which has inside an index.html file.

While this CAN be one way to do that, there are plenty of ways, for example using some framework based on the coding language of your choice.

In simple words: normally there are a piece of software that runs on the server, which get your request (ie: https://xkcd.com/2148/), elaborate it gluing together the "main template" (header, footer, layout) and the comic requested (2148).

If you want to learn how to do it, I'll suggest you to look over some simple php framework, like laravel, with some tutorial.

It may be confusing at the beginning, but it's a good start if you want to use PHP.

Alternatively, in this answer are present some very good advice to start learning web development: https://softwareengineering.stackexchange.com/a/15329/336186

Not the answer you're looking for? Browse other questions tagged or ask your own question.