4. Make it yours¶
4.1 Put your details in site.toml¶
Click site.toml in the list on the left. Change the words inside the quotation marks, and keep the quotation marks themselves. The url line must be your own address.
name = "Sara Khan"
url = "https://sara-khan.github.io"
affiliation = "Department of Geography, Example University"
Lower down, the social lines set the small icons at the bottom of each page. Change the email address and the GitHub address, and delete a whole line if you do not want that icon. Save with Ctrl and S, or Cmd and S on a Mac. A white dot on the file’s tab means it has unsaved changes.
4.2 Write your home page¶
Open src/pages/index.html. The lines above the --- describe the page, and everything below it is what visitors read. Text sits between tags, which are the words in angle brackets. <h1> marks the main heading, <h2> a smaller heading, and <p> a paragraph. A link looks like this:
<p>I study rivers at <a href="https://example.org">Example University</a>.</p>
Change the words and keep the tags. Then do the same in work.html and cv.html.
4.3 Build the site and look at it¶
The pages you edit are the raw material, so you now run the program that makes the finished site. In the terminal, type:
python build.py
python -m http.server 8000
The first command writes the finished pages. The second serves them on your own computer only. Open a browser and go to http://localhost:8000, and you will see your site. Nobody else can see this version.
When you have finished looking, click in the terminal and press Ctrl and C to stop the second command. Each time you change something, run python build.py again and refresh the browser.
4.4 Add a page, if you want one¶
To add a page about your teaching, make a new file, src/pages/teaching.html, that begins like this:
title: Teaching
description: Courses I teach.
nav: teaching
out: teaching.html
---
<section class="prose" style="padding:3rem 0">
<h1>Teaching</h1>
<p>Write about your courses here.</p>
</section>
Then add a line to the menu in site.toml, in the same form as the others:
{key = "teaching", label = "Teaching", href = "teaching.html"},