Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

3 watching

Forks

Latest commit

 

History

1,090 Commits

Folders and files

Repository files navigation

UofT Astronomy Graduate Student Handbook

Source for UofT's Department of Astronomy and Astrophysics guide to graduate school at https://uoftgasa.github.io/. It's a static site: the handbook is written in Markdown and converted to HTML with pandoc, then served by GitHub Pages.

Everything in this repo is public. Don't commit passwords or other sensitive information.

Path What it is
markdown/index.md Source for the handbook. Edit this.
index.html Generated from markdown/index.md by convert_md_to_html.sh, so don't edit it directly.
html-template/template.html Pandoc template: page layout, sidebar table of contents and a few inline TOC styles
html-template/style.css Stylesheet linked by every page
convert_md_to_html.sh Builds index.html from markdown/index.md

Install

You need Git and pandoc (checked with pandoc 3.8.2.1).

brew install pandoc    # macOS; for other systems see https://pandoc.org/installing.html
git clone https://github.com/uoftgasa/uoftgasa.github.io.git
cd uoftgasa.github.io

Run locally

bash convert_md_to_html.sh    # markdown/index.md -> index.html
open index.html               # macOS; elsewhere, open index.html in any browser
  • Run the script from the repo root, because its paths are relative to the current directory.
  • No local server is needed. The pages have no JavaScript and use relative paths, so opening the file directly works.
  • After editing markdown/index.md or template.html, re-run the script and refresh the page. After editing style.css, just refresh.

Edit the handbook

  1. Edit markdown/index.md. Headings down to ### appear in the sidebar table of contents automatically. The sidebar is hidden on small screens, so also add new sections to the manual "Table of Contents" list near the top, and put a [**Table of Contents**](#table-of-contents) back-link under each section heading.
  2. Run bash convert_md_to_html.sh.
  3. Check the result locally.
  4. Commit both markdown/index.md and the regenerated index.html. Nothing rebuilds the HTML on deploy, so if you skip the rebuild, your changes won't go live.

To change the look, edit html-template/style.css, which applies to all pages without a rebuild. The inline <style> block in template.html is copied into index.html, so changes there need a rebuild.

Contributing

  • Suggest a change: open an issue that says clearly what should change.
  • Make the change yourself: fork the repo, or use a branch if you have write access. Follow the steps above and open a pull request into master. Include the regenerated index.html so the change can go live as soon as it's merged.

Package and deploy

There's no packaging step, because the committed files are the site. Push or merge to master. GitHub Pages then publishes the repo root to https://uoftgasa.github.io/, usually within a minute. Other branches and pull requests are not deployed.

Notes:

  • Rebuild before you push: Pages serves index.html as committed. It doesn't run pandoc.
  • Checking a deploy: each push starts a "pages build and deployment" run in the Actions tab. The Pages settings (source: master, root folder) are under Settings → Pages.
  • Redeploying without changes: push an empty commit (git commit --allow-empty -m "Redeploy" && git push).

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages