Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Wiki theme upgrade strategy #71

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# XS-Leaks Wiki
[![Hugo](https://img.shields.io/badge/hugo-0.68-blue.svg)](https://gohugo.io)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
[![Actions Status](https://github.com/xsleaks/wiki/workflows/GitHub%20Pages/badge.svg)](https://github.com/xsleaks/wiki/actions)

## Build Process

### Build locally

1. Install the [Hugo Framework](https://gohugo.io/getting-started/installing/) **extended** version > 0.68
1. Install the [Hugo Framework](https://gohugo.io/getting-started/installing/) **extended** version >= 0.68
2. Clone this repo
3. Run `hugo server --minify` in root directory
4. Open your browser and go to http://localhost:1313 (or as indicated by hugo output)
Expand All @@ -17,4 +20,22 @@

This repository uses [Github Actions](https://github.com/features/actions) to automatically build and publish a static version of the XS-Leaks Wiki once a Pull Request is accepted. To bring Github Pages automation into Github Actions we use [actions-gh-pages](https://github.com/peaceiris/actions-gh-pages). To automatically build a website with the Hugo Framework, we use [actions-hugo](https://github.com/peaceiris/actions-hugo)

The strategy used to give the workflow access to this repository uses a [deploy_key](https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-set-ssh-private-key-deploy_key) which is privately set in this repository.
The strategy used to give the workflow access to this repository uses a [deploy_key](https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-set-ssh-private-key-deploy_key) which is privately set in this repository.

## Theme

The XS-Leaks Wiki uses the [v8](https://github.com/alex-shpak/hugo-book/releases/tag/v8) tag of [hugo-book](https://github.com/alex-shpak/hugo-book) Theme. We applied custom modifications to the theme, so we chose the wiki lives inside the repository as a subtree. It was added with the following command:

```console
xsleaks@wiki:~$ git subtree add --prefix themes/hugo-book https://github.com/alex-shpak/hugo-book.git v8 --squash
```

To change the template just change any file and commit as usual.

### Instructions to Upgrade

Replace `REPLACE_TAG` with the correct tag. After pulling, merge all conflicts properly.

```console
xsleaks@wiki:~$ git subtree pull --prefix themes/hugo-book https://github.com/alex-shpak/hugo-book.git REPLACE_TAG --squash
```
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ baseURL = "https://xsleaks.dev/"
languageCode = "en-us"
title = "XS-Leaks Wiki"
enableGitInfo = true
theme = "book"
theme = "hugo-book"

[params]
# Set source repository location.
Expand Down
21 changes: 0 additions & 21 deletions themes/book/i18n/jp.yaml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.