Guide to building a personal academic website.
Here is some suggested minimum content
- Your name and current affiliation
- A short biography
- Selected publications
- Selected projects/code
- Contact details
Here are some other things you could include,
- Links to social media
- A link to your CV
- Teaching courses and links to material
- A blog
- Press releases
- List of people in your research group
-
Follow instructions at pages.github.com to create the base repository for your website. It should be called
<username>.github.io
. -
To create a static HTML5 website, you can start from scratch or download a template from e.g. HTML5 UP.
-
Clone your repository,
git clone https://github.com/<username>/<username>.github.io
-
Copy the contents of an HTML5 template into your repository
- E.g. this site was made with the Strata template
-
Open
index.html
locally in a text editor and in a browser -
Make changes to
index.html
and refresh your browser. See what effect the changes have.
If you have already created <username>.github.io
and want to deploy a new repository to GitHub pages:
-
Create the repository called
<reponame>
-
Go to the repository "Settings" tab at
https://github.com/<username>/<reponame>
-
Navigate to "Settings" > "Pages" > "Build and deployment"
-
Change the "Source" to GitHub Actions. Here you can choose between deploying a website with Jekyll or statically. For this website, we chose static deployment. Consider Jekyll if you wish to publish a blog.
-
Now you can create an
index.html
file in your repository and it will publish tohttps://<username>.github.io/<reponame>
You may find just opening index.html
in your browser doesn't work properly. For example, if you have any JavaScript which reads other files, your browser may block this. Instead, you will need to run a local http server. Here is one way of doing this:
-
Install
node.js
E.g.
conda install nodejs
-
Install the
http-server
packagenpm install http-server -g
-
Run command
http-server
in your website repo -
Go to browser and type
localhost:8080
If you are using a website generator (see below) then it likely has its own way of launching a local server to test and develop your site.
This repository covers creating a simple, one-page website. However, if you want to write a blog or manage multiple pages you should consider a static website generator. Choosing this may require your own experimentation or research. For example,
Theses are often command-line scripts which build your site from a set of input files and templates. To deploy them on GitHub pages, you should make use of GitHub Actions. You can search for relevant actions on the GitHub Marketplace and sort by popularity to find what you want.
If you don't want to start from scratch, search GitHub for template repositories which will include the relevant GitHub Actions to build and deploy your website. Browsing GitHub Topics can help in finding these templates. For example, the topic jekyll-theme has many popular open-source Jekyll themes to explore. Find one with usage instructions and get started.
Here are a few alternatives for website hosting/building which do not require coding,
- Wordpress.org (free) - open source builder (not for hosting)
- Wordpress.com (free/paid) - based on the Wordpress builder with free/paid hosting plans
- Squarespace (paid) - website building and hosting