HAX technology is unlike anything that's existed previously in the CMS space. HAX sites have the following characteristics that make them unique:
No configuration / file changes are required for the below to operate because of how the build.js
script included with all HAX sites works. You can read more about this in the Dev.to blog series about how Penn State ships web components
. The magic script, extended since the original article was written, operates in the following order:
wc-registry.json
exists locally and loads all assets locallyIf you wish your site to be 100% self contained and NOT rely on our CDN to hydrate, then you'll want to copy and include the following files on your server:
Place this folder and file in the root of your site and it will operate completely agnostic of changes to the CDN managed to keep sites on the latest copy of assets.
No configuration beyond getting the files up on github should be necessary. Just make sure when configuring the Settings for your repo that you point to the main
/ master
branch as opposed to gh-pages
branch for serving your site.
surge.sh .
should be all you need in order to publish a newly downloaded folder to surge. This is because of the magic script's defaults matching surge!
Downloading HAX sites allows you to take your site with you at the click of a button by unzipping it onto your own hosting service. Here are some considerations of that:
PHP
running on it you might want to consider having a copy of HAXcms on the server. This is because the default .htaccess
file settings prioritize loading index.php
over the included index.html
. You'll want to make sure that you change this setting OR review the top of the index.php
file for where to store a copy of HAXcms on your server. The advantage of having PHP
based hosting is that it will improve SEO scores / initial load performance due to being able to hint to the browser what content is coming.index.php
file as it is managed and will change in future downloads / exports, but the paths mentioned can be modified in order to load HAXcms dynamically if your hosting / path provider requires that you store these elsewhereIn all sites there is a backdoor file for adding custom CSS and JS. These files have defaults (of nothing) but load so that if you want to make hard-coded changes you can inject customized JS and CSS. For JS custom/build/custom.es6.js
is the file you'll want to modify and for CSS theme/theme.css