Skip to content

Commit 249b5ce

Browse files
author
seven
committed
init hugo with theme stack and vscode devcontainer ssh-agent
0 parents  commit 249b5ce

35 files changed

+914
-0
lines changed

.devcontainer/Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM klakegg/hugo:ext-alpine
2+
3+
RUN \
4+
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
5+
&& apk add --no-cache openssh-client
6+
7+
EXPOSE 1313

.devcontainer/devcontainer.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "klakegg/hugo:ext-alpine",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"remoteEnv": {
7+
"SSH_AUTH_SOCK": "/tmp/ssh-agent.socket"
8+
},
9+
"portsAttributes": {
10+
"1313": {
11+
"label": "Hugo Port",
12+
"protocol": "http",
13+
"onAutoForward": "openBrowserOnce",
14+
"requireLocalPort": true,
15+
"elevateIfNeeded": true
16+
}
17+
},
18+
"forwardPorts": [
19+
1313
20+
],
21+
"postCreateCommand": {
22+
"git-submodule": "git pull && git submodule init && git submodule update"
23+
},
24+
"postStartCommand": {
25+
"git-update": "git pull && git submodule update",
26+
"start": "hugo server --buildDrafts --buildExpired --buildFuture --navigateToChanged"
27+
},
28+
"mounts": [
29+
"source=profile,target=/root,type=volume",
30+
"target=/root/.vscode-server,type=volume",
31+
"source=/run/user/1000/ssh-agent.socket,target=/tmp/ssh-agent.socket,type=bind,consistency=cached,ro"
32+
],
33+
"customizations": {
34+
"vscode": {
35+
"extensions": [
36+
"k--kato.intellij-idea-keybindings",
37+
"redhat.vscode-yaml",
38+
"DotJoshJohnson.xml"
39+
]
40+
}
41+
}
42+
}

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.hugo_build.lock
2+
public/
3+
resources/
4+
themes/
5+
assets/jsconfig.json

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "themes/hugo-theme-stack"]
2+
path = themes/hugo-theme-stack
3+
url = https://github.com/CaiJimmy/hugo-theme-stack/

.vscode/tasks.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Hugo Dev",
8+
"type": "shell",
9+
"command": "hugo server --buildDrafts --buildExpired --buildFuture --navigateToChanged",
10+
"group": {
11+
"kind": "test",
12+
"isDefault": true
13+
},
14+
"isBackground": true,
15+
"problemMatcher": []
16+
},
17+
{
18+
"label": "Build",
19+
"type": "shell",
20+
"command": "hugo",
21+
"group": {
22+
"kind": "build",
23+
"isDefault": true
24+
},
25+
"problemMatcher": []
26+
}
27+
]
28+
}

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 开源服务指南博客
2+
3+
## 技术栈
4+
5+
- Built with [hugo](https://gohugo.io/) | Theme with [Stack](https://github.com/CaiJimmy/hugo-theme-stack)
6+
- Containered by [Docker](https://www.docker.com/) based on [klakegg/hugo](https://hub.docker.com/r/klakegg/hugo/)

archetypes/categories.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
image:
4+
style:
5+
background: "#2a9d8f"
6+
color: "#fff"
7+
---

archetypes/default.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
description:
4+
slug:
5+
date: {{ .Date }}
6+
image:
7+
math:
8+
license:
9+
hidden: false
10+
comments: true
11+
draft: true
12+
---

archetypes/tags.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
description:
4+
image:
5+
---
Loading
Loading
Loading
Loading
Loading
Loading
40.9 KB
Loading

assets/scss/custom.scss

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/*
2+
You can add your own custom styles here.
3+
*/

0 commit comments

Comments
 (0)