This website
Dan Buscombe
Chief Webber @ MardaHow did we set up this Marda science website? It was a rocky road ... we initially paid for a commercial WordPress hosting which was, well, let's just say awful and move on!
Next, we wanted something easy, free, and just code.
I decided to use github's free gh pages
web hosting service, which also provides an ssl certificate through letsencrypt. For web pages, I went with docusaurus, which is meant for documentation but works great for simple webpages such as these, with a relatively shallow learning curve. There's a little bit of javascript, a bit of css, and some markdown. Then its all about git, and confusing web stuff.
#
GithubFirst I set up this github repository
#
DocusaurusGenerated a classic
v2 docusaurus website template:
Switched to the newly created website
directory:
(started writing the website)
Pushed it to github
Pushed website to gh-pages
like so:
At which point the website was visible at https://MARDAScience.github.io/web/
#
Custom DomainI transferred the domain name, "mardascience.com", from the awful hosting service we had naively gone with previously, to namecheap.
In namecheap, under the domain listing, I used the "Advanced DNS" tab to add these “A records” (host for each is @)
(those IPs were obtained from here and apparently change every so often)
I also added the following CNAME record
(not the trailing dot after io
)
#
Back to DocusaurusThe top of the docusaurus.config.js
file should look like
Add a CNAME
file to both the root (web
) and /website/
that says, simply
(note the www.
is included)
Push it to github:
Push website to gh-pages
#
Back to GithubOn github pages, add custom domain name:
Check Enforce HTTPS
. After a DNS check, it should be visible at https://www.mardascience.com/