Skip to content

Commit

Permalink
📝 add instruction
Browse files Browse the repository at this point in the history
- to test in GitHub Codespaces
  • Loading branch information
enryH committed Oct 1, 2024
1 parent 4e5dff4 commit 2ff5666
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Template for a static website using Sphinx and GitHub Pages

## Instructions

### 1. Fork repository

- now you are already publish the site which looks identical to the template site
(see it here)
- jump to step 5 to do that directly.

### 2. Open in GitHub Codespaces

- go to [github.com/codespaces](https://github.com/codespaces)
- create a new codespace using the forked repository

### 3. Edit files

- update in `conf.py` at least the author, project and copyright information at the top
- write something about you in `about.md`
- write articles in `folder_topic/article_topic.md`
- update the `index.md` file to include new files
- use [pandoc](https://pandoc.org/try/) to convert your previous files into markdown or
reStructuredText

### 4. Build the site locally

> Have look at `.github/workflows/build-website.yaml` to see how the site is built.
- Open a terminal (GitHub Codespaces)
- install required packages from [`requirements.txt`](requirements.txt):
```bash
pip install -r requirements.txt
```
- build the site (you could set an alias if you want):
```bash
sphinx-build -n -W --keep-going -b html ./ ./_build/
```
- open the site in a browser:
- install "Live Preview" extension in Visual Studio Code
- open the `_build/index.html` file in the browser

### 5. Publish the site

Follow
[these instructions](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)
to publish the website using GitHub Pages.

- Select the `gh-pages` branch as the source for the GitHub Pages site (currently step 7)

0 comments on commit 2ff5666

Please sign in to comment.