<metaproperty="og:description"content="Recently I’ve become disillusioned with most CMS options. They’re a pain to keep updated, plugins are constantly being abandoned, and they’re so prevalent in sites that they make a very attractive tar">
<metaproperty="og:description"content="Recently I’ve become disillusioned with most CMS options. They’re a pain to keep updated, plugins are constantly being abandoned, and they’re so prevalent in sites that they make a very attractive tar">
<metaname="twitter:title"content="Static Site what?!">
<metaname="twitter:title"content="Static Site what?!">
<metaname="twitter:description"content="Recently I’ve become disillusioned with most CMS options. They’re a pain to keep updated, plugins are constantly being abandoned, and they’re so prevalent in sites that they make a very attractive tar">
<metaname="twitter:description"content="Recently I’ve become disillusioned with most CMS options. They’re a pain to keep updated, plugins are constantly being abandoned, and they’re so prevalent in sites that they make a very attractive tar">
...
@@ -137,6 +137,7 @@
...
@@ -137,6 +137,7 @@
<h4id="But-why"><ahref="#But-why"class="headerlink"title="But, why?"></a>But, why?</h4><p>The idea is that <em>most</em> sites don’t actually need to use dynamic code. Their content is, for the most, part static. Users aren’t interacting with the content (other than the comments sections and forms but we’ll talk about that later). They are, instead, just reading it. The only person who seems to be interacting with it is the person that owns the site. Even then, the owner isn’t actively interacting. They are writing a post, or updating a page. After that, everything stays the same.</p>
<h4id="But-why"><ahref="#But-why"class="headerlink"title="But, why?"></a>But, why?</h4><p>The idea is that <em>most</em> sites don’t actually need to use dynamic code. Their content is, for the most, part static. Users aren’t interacting with the content (other than the comments sections and forms but we’ll talk about that later). They are, instead, just reading it. The only person who seems to be interacting with it is the person that owns the site. Even then, the owner isn’t actively interacting. They are writing a post, or updating a page. After that, everything stays the same.</p>
<h3id="Enter-Hexo"><ahref="#Enter-Hexo"class="headerlink"title="Enter, Hexo"></a>Enter, <ahref="https://hexo.io/"target="_blank"rel="noopener">Hexo</a></h3><p>Hexo is a neat little package. </p>
<h3id="Enter-Hexo"><ahref="#Enter-Hexo"class="headerlink"title="Enter, Hexo"></a>Enter, <ahref="https://hexo.io/"target="_blank"rel="noopener">Hexo</a></h3><p>Hexo is a neat little package. </p>
<p>Originally I thought I would install it, set up an apache virtual reverse proxy via an <code>.htaccess</code> file and let node serve static files. Some people do this. It’s a valid way to serve a site. The problem that I have with this, is that it’s just another vulnerable layer of code that I don’t have the inclination to audit. It could potentially have glaring security holes and I wouldn’t know. Again, I want to clarify that I don’t know much of anything about security. I’m not a cryptographer, nor an expert on cyber security. However, I can easily read the html that comes out the other end of the site generator and verify that there are no well-known issues with the javascript or html.</p>
<p>Originally I thought I would install it, set up an apache virtual reverse proxy via an <code>.htaccess</code> file and let node serve static files. Some people do this. It’s a valid way to serve a site. The problem that I have with this, is that it’s just another vulnerable layer of code that I don’t have the inclination to audit. It could potentially have glaring security holes and I wouldn’t know. Again, I want to clarify that I don’t know much of anything about security. I’m not a cryptographer, nor an expert on cyber security. However, I can easily read the html that comes out the other end of the site generator and verify that there are no well-known issues with the javascript or html.</p>
<p>If this is the way you wanted to do it, you would need, at the very least, this sort of <code>.htaccess</code> configuration in your root<br><figureclass="highlight plain"><table><tr><tdclass="gutter"><pre><spanclass="line">1</span><br><spanclass="line">2</span><br><spanclass="line">3</span><br><spanclass="line">4</span><br><spanclass="line">5</span><br><spanclass="line">6</span><br></pre></td><tdclass="code"><pre><spanclass="line">RewriteEngine On</span><br><spanclass="line">DirectoryIndex index.html </span><br><spanclass="line">RewriteRule ^$ http://127.0.0.1:4000 [P,L]</span><br><spanclass="line">RewriteCond %{REQUEST_FILENAME} !-f</span><br><spanclass="line">RewriteCond %{REQUEST_FILENAME} !-d</span><br><spanclass="line">RewriteRule ^(.*)$ http://127.0.0.1:4000/$1 [P,L]</span><br></pre></td></tr></table></figure></p>
<p>So what to do? Well, the output is a fully static html/css/js site. No need for node, no need for a reverse proxy. This will just work when popped into a public directory of a webserver.</p>
<p>So what to do? Well, the output is a fully static html/css/js site. No need for node, no need for a reverse proxy. This will just work when popped into a public directory of a webserver.</p>
<ahref="/posts/setting-up-hexo-auto-deploy-from-gitlab/"title="getting that set up">getting that set up</a>
<ahref="/posts/setting-up-hexo-auto-deploy-from-gitlab/"title="getting that set up">getting that set up</a>