add nginx
This commit is contained in:
parent
4e9aacfab8
commit
8b0111450b
61
.github/workflows/docker.yml
vendored
Normal file
61
.github/workflows/docker.yml
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
# https://hexo.io/docs/github-pages.html
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- source # default branch
|
||||
|
||||
jobs:
|
||||
pages:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Set up Pandoc
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install pandoc -y
|
||||
|
||||
- name: Use Node.js 15.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "15.x"
|
||||
|
||||
- name: Cache NPM dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.OS }}-npm-cache
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-npm-cache
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: ghcr.io/uetchy/uechi.io:latest
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM nginx:stable-alpine
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
COPY public /var/www/html/
|
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
web:
|
||||
image: ghcr.io/uetchy/uechi.io
|
||||
build: .
|
||||
ports:
|
||||
- "8080:80"
|
46
nginx.conf
Normal file
46
nginx.conf
Normal file
@ -0,0 +1,46 @@
|
||||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
root /var/www/html;
|
||||
error_page 404 /404.html;
|
||||
|
||||
location /404.html {
|
||||
internal;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location / {
|
||||
index index.html;
|
||||
try_files $uri $uri.html $uri/index.html =404;
|
||||
}
|
||||
|
||||
location = / {
|
||||
if ($http_user_agent ~ curl) {
|
||||
rewrite / /TERMINAL last;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
8
source/TERMINAL
Normal file
8
source/TERMINAL
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
░█░█░█▀▀░█▀▀░█░█░▀█▀░░░░▀█▀░█▀█
|
||||
░█░█░█▀▀░█░░░█▀█░░█░░░░░░█░░█░█
|
||||
░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░░▀▀▀░▀▀▀
|
||||
|
||||
GitHub: https://github.com/uetchy
|
||||
Twitter: https://twitter.com/uechz
|
||||
Wallpaper: https://uechi.io/wallpaper
|
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 snovey
|
||||
Copyright (c) 2021 Yasuaki Uechi <y@uechi.io>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1,11 +1,15 @@
|
||||
<section>
|
||||
<article class="article">
|
||||
<hgroup class="article__metadata">
|
||||
<% if (page.date) { %>
|
||||
<h3 class="article__pubdate">
|
||||
<time pubdate><%- date(page.date, "YYYY-MM-DD") %></time>
|
||||
</h3>
|
||||
<% } %>
|
||||
<% if (page.updated) { %>
|
||||
<h3 class="article__pubdate">
|
||||
<time pubdate><%- date(page.updated, "YYYY / <b>MM</b>") %></time>
|
||||
</h3>
|
||||
<% } else if (page.date) { %>
|
||||
<h3 class="article__pubdate">
|
||||
<time pubdate><%- date(page.date, "YYYY / <b>MM</b>") %></time>
|
||||
</h3>
|
||||
<% } %>
|
||||
<h2 class="article__title"><%- page.title %></h2>
|
||||
</hgroup>
|
||||
<div class="article__content"><%- page.content %></div>
|
||||
|
@ -9,6 +9,7 @@ $break-large: 840px;
|
||||
--accent: #4f33e8;
|
||||
--highlight: #f6f6f6;
|
||||
--tone: #989898;
|
||||
--dim: rgb(203, 203, 203);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@ -18,6 +19,7 @@ $break-large: 840px;
|
||||
--accent: #7033e8;
|
||||
--highlight: #140d25;
|
||||
--tone: #989898;
|
||||
--dim: rgb(90, 83, 101);
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,7 +35,7 @@ body {
|
||||
font-family: "PT Sans", "Hiragino Sans", "Hiragino Mincho ProN", sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-feature-settings: "kern", "palt", "pwid";
|
||||
font-feature-settings: "kern", "pwid";
|
||||
-webkit-font-feature-settings: "kern", "palt", "pwid";
|
||||
-moz-font-feature-settings: "kern", "palt", "pwid";
|
||||
-moz-font-feature-settings: "kern=1", "palt", "pwid";
|
||||
|
@ -89,14 +89,17 @@ a.article-list__item__button {
|
||||
|
||||
.article__pubdate {
|
||||
color: var(--tone);
|
||||
font-size: 14px;
|
||||
font-weight: lighter;
|
||||
font-family: sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: 300;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid var(--tone);
|
||||
display: inline-block;
|
||||
padding: 5px 20px;
|
||||
|
||||
b {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
margin-bottom: 15px;
|
||||
font-size: 10pt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user