This repo contains the source of a blog site written with vanilla HTML, SCSS and JS (no frameworks).
Table of contents -> Build | Credit
The only part of the code that requires some kind of pre-processing are the stylesheets. The following files must be compiled to css before serving the site:
- The
/styles/main.scss
file. - All the root scss files in the
/styles/pages/
. This folder contain page specific styles and are only included in the specific pages that include them. - The following, FontAwesome files in the
/styles/vendors/fontawesome/scss
folder:fontawsome.scss
,regular.scss
&solid.scss
.
The site uses http requests to retrieve html snippets for certain sections. Because of this, modern browsers will raise
a CORS error (Cross Site Resource Sharing). To stop this from happening the site must be viewed through a web server so
that your browser uses the http://
protocol and not locally on your machine by opening the index.html file which will
cause your browser to use the file///
protocol. The simplest way to set up a local server for testing/development is
to use Python. If you have Python3 install you can start a local web server with the following command:
python -m http.server
This will create a local web server with its document root in whatever folder you invoked the command in. Python will
display the address the website can be accessed from. Use a keyboard interrupt (Ctrl-C
or your system's equivalent)
to stop the server.
- FontAwesome Free icons (FontAwesome)
- UnifiedJS and the reHype and reMark packages are used to draft the articles in Markdown then compile them to HTML. UnifiedJS