www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

index.html (3888B)


      1 <!DOCTYPE html>
      2 <html>
      3 	<head>
      4 		<title>banna - ramblings</title>
      5 		<meta name="viewport" content="width=device-width, initial-scale=1">
      6 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      7 		<link rel="stylesheet" href="/styles/style.css" />
      8 		<link rel="stylesheet" href="/styles/look.css" />
      9 		<link rel="stylesheet" href="/styles/codetheme.css" />
     10 		<script src="/scripts/highlight.js"></script>
     11 		<script>hljs.initHighlightingOnLoad();</script>
     12 	</head>
     13 
     14 	<body>
     15 		<div id="sidebar">
     16 			<div id="logo">
     17 				<a href="/">
     18 					<img src="/banna.png" alt="banna.tech" height="45" width="201" />
     19 				</a>
     20 			</div>
     21 			<div id="nav">
     22 				<a class="current" href="/post">blog</a>
     23 				<a class="" href="/things">things</a>
     24 				<a class="" href="/about">about</a>
     25 			</div>
     26 		</div>
     27 
     28 		<div id="wrapper">
     29 			<div id="content">
     30 <div class="post">
     31     <a href="/post/somethings_new_in_the_air" class="link"><h1 class="header">Something's new in the air</h1></a>
     32     <span class="date">Posted on May, 25 2014</span>
     33     <div class="content">
     34 <p>After a week of work, I finally moved away from my weird blogging platform written in a weird language.</p>
     35 
     36 <p>When I started this little project to make a website of my own, I was dabbling in the art of "PHP". This was a very dangerous, and a rather scary art. My little website needed a way to dynamically manage content, for it would be a Blog in which I would write posts of text and share it with the internet. It so happens that I started delving into PHP to do such a task.</p>
     37 
     38 <p>A few hours later of thinking about how I would do such a thing and bam, I came up with a way to have a small text database in JSON to assemble a page with various posts based of a series of templates and some fancy text manipulation skills. At the time, the simplicity astounded me. The architecture went something like this: index.php, posts.json and pagedata.json all in a directory, index.php reads pagedata.json and constructs a template and evaluates any sort of queries, and then takes data from posts.json and assembles the proper page for a specific request. For any other page, you would just configure pagedata.json to get the proper output.</p>
     39 
     40 <p>At the time, this was on-par with what I required. As time progressed, I slowly began to realize that maybe this wasn't a best idea.</p>
     41 
     42 <p>For example, as the posts accumulated I noted that the size of posts.json and how inefficient it is to load that big of a file every time someone loads the page. The idea then struck me to create a static website builder.</p>
     43 
     44 <p>The concept is simple: Take a configuration and various templates to create the entire site into html files, and serve them instead of evaluating scripts. For large sites with content create by users that require accounts, this is not possible. But for a simple blog that should be static in the first place, it is the best option.</p>
     45 
     46 <p><img src="//i.banna.tech/70blog.png" style="box-shadow:none"></img>
     47 <p>When it came to actually creating the first iteration of the program, things were slow and steady. To transition from a script that created all the pages from just spitting out a string on the request of a page, to something that interpreted and built the entire website with one command was something that required some thinking. The concept for the program was to take a generic configuration specifying the page name, page variables, templates, and modules for a given page. The program then would go through each page and generate a template and run a specified module to create a set of subpages. Once all the pages were done being processed, the site with all the pages and subpages would be written to a directory. With the new content managing system, there is no more limitations to what pages can look like and behave.</p></p>
     48     </div>
     49 </div>
     50 
     51 
     52 			</div>
     53 		</div>
     54 	</body>
     55 </html>