Skip to content

Commit

Permalink
docs(pages): setup
Browse files Browse the repository at this point in the history
  • Loading branch information
liblaf committed Oct 28, 2022
1 parent 8de7199 commit 146d5ca
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy GitHub Pages

on:
push:
branches:
- main
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: |
bash scripts/pre-deploy.sh
- uses: xu-cheng/latex-action@v2
with:
root_file: |
demo/article/default/article.tex
demo/article/twocolumn/article-twocolumn.tex
demo/article/zh/article-zh.tex
demo/work/default/work.tex
work_in_root_file_dir: true
latexmk_shell_escape: true
latexmk_use_xelatex: true
- run: |
mv demo/**/*.pdf docs/demo/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: docs
enable_jekyll: true
5 changes: 5 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
25 changes: 25 additions & 0 deletions docs/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
permalink: /404.html
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
34 changes: 34 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.3.1"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12"
gem "jekyll-seo-tag"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
10 changes: 10 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: ilatex
author: liblaf
email: [email protected]
description: >-
Simple LaTeX Templates
github_username: liblaf
theme: minima
plugins:
- jekyll-feed
- jekyll-seo-tag
Empty file added docs/demo/.gitkeep
Empty file.
14 changes: 14 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: "Demos"
layout: page
---

## Article

- [default](demo/article.pdf)
- [twocolumn](demo/article-twocolumn.pdf)
- [chinese](demo/article-zh.pdf)

## Course Work

- [default](demo/work.pdf)

0 comments on commit 146d5ca

Please sign in to comment.