Creating a Text-Based Website

This article was originally written before I moved back to WordPress as my blogging platform. I still believe there is huge value in a text based website. However, my workflow and project needs have since expanded, warranting WordPress as my platform for this current project.

Project Summary: I have built websites in fits and starts since the late 1990s. I enjoyed Dreamweaver, plain html, Joomla, and recently WordPress. However, I very much began to miss the simple sites of the early web. These were sites that while very basic in nature still conveyed the information that was needed/desired. They did so without fancy code and extra layers. I very much appreciate SQL, php, and even CGI as technologies which certainly have their place. However, I believe that getting back to basics is important for preservation and portability of information. While contemplating this I discovered the Markdown syntax. I also discovered that Markdown could be easily converted into HTML. I began to see a potential for a very simple site structure and workflow. This very website is the fruition of this discovery.

Deciding on a Folder Structure

In past designs I have always leveraged multiple directories within a parent directory to hold specific types of content. However, I felt that somehow may have made it too easy to misplace something at a glance. For this project I decided to limit my use of folders and rather employ proper naming conventions to create the structure I needed. You will see this reflected in the page URLs. For example, geek.project.text-based.website.html employs the same segregation of files but allows me to keep them in a single directory which I can see at a glance and know exactly what category it is in. A caveat to this approach is that I still keep a separate directory within the root which holds images and other unique files.

Writing and Formatting

I write the site in Markdown syntax which is later converted to HTML. I do have to pay attention to the use of apostrophes and some other punctuation as they will not translate well from Markdown to HTML. I leverage a single css (cascading style sheet) to command the page structure. To keep the menu structure consistent I have created a template.md file which holds the menu and css reference. When I want to compose a new page I can simple copy the template to a file of a new name and begin typing. Once I am done I do create the links manually. Perhaps I will learn a way to automate that process as well. For now, manual is the way.

Automating the Build and Upload

All of the Markdown files are stored in a local directory. Pandoc is then leveraged to convert the .md files into .html files. Next, rsync will upload all of the html files in the directory. Finally the script will remove the html files from the local directory after they have been successfully uploaded. The script can also upload other directories such as mentioned above.

Conclusion

This process allows me to build and maintain this site from a terminal session which was another reason for wanting to build a text-based site. Features such as search are not present without leveraging Google to crawl the site. Perhaps in the future, this will be added. Ultimately I would rather keep it all contained without the help of big tech. In the future should I decide to move to a new format or platform there may be some pain involved. However, for now I am happy with the simplicity of what I have created.