edited post
This commit is contained in:
parent
efbea543b9
commit
1beab2af89
|
@ -1 +1 @@
|
||||||
public/
|
public/*
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
+++
|
||||||
|
date = 2000-01-01T00:00:00Z
|
||||||
|
description = ""
|
||||||
|
draft = true
|
||||||
|
slug = "draft"
|
||||||
|
title = "draft"
|
||||||
|
+++
|
||||||
|
|
||||||
|
## body
|
|
@ -0,0 +1,12 @@
|
||||||
|
+++
|
||||||
|
date = 2023-10-23T18:45:50+09:00
|
||||||
|
description = ""
|
||||||
|
draft = true
|
||||||
|
slug = "draft"
|
||||||
|
title = "draft"
|
||||||
|
+++
|
||||||
|
|
||||||
|
### Git 호스팅
|
||||||
|
지금 개인 프로젝트들은 Gitea에 넣고 있다. 서버가 있으니까 여러가지 호스팅을 할 수 있어서 좋은데, 예전에는 ssh에 그냥 bare repo로 썼었다. 근데 아무리 개인 프로젝트라지만 깃헙에 미러링해야 할 때도 있고, 웹으로 에디팅하거나 봐야하는 경우가 많아서 웹UI가 필요한 상황이었다.
|
||||||
|
|
||||||
|
그렇다고 이것들을 깃허브에 넣기가 좀 그렇기도 하고,, 아무리 private repo라지만 외부 서비스에 넣는게 좀 찝찝해서
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
TITLE="changeme"
|
||||||
|
DATE=$(date +%Y-%m-%d)
|
||||||
|
FILE="$DATE-$TITLE.md"
|
||||||
|
|
||||||
|
if [ ! -f content/posts/$FILE ]; then
|
||||||
|
echo Creating new file $FILE
|
||||||
|
cp content/posts/2000-01-01-draft.md content/posts/$FILE
|
||||||
|
sed -i "s/date = 2000-01-01T00:00:00Z/date = $(date -Isec)/g" content/posts/$FILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $( command -v subl ) ]; then
|
||||||
|
subl $FILE
|
||||||
|
elif [ $( command -v gedit ) ]; then
|
||||||
|
gedit $FILE
|
||||||
|
elif [ $( command -v vim ) ]; then
|
||||||
|
vim $FILE
|
||||||
|
else
|
||||||
|
$EDITOR $FILE
|
||||||
|
fi
|
|
@ -0,0 +1,25 @@
|
||||||
|
backend:
|
||||||
|
name: gitea
|
||||||
|
repo: morgan/blog # Path to your Gitea repository
|
||||||
|
app_id: 3d870a4a-e0a1-4eae-b9bd-c829d79ab294 # The Client ID provided by Gitea
|
||||||
|
api_root: https://git.morgan.kr/api/v1 # API URL of your Gitea instance
|
||||||
|
base_url: https://git.morgan.kr # Root URL of your Gitea instance
|
||||||
|
# optional, defaults to master
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
media_folder: static/img
|
||||||
|
public_folder: /img
|
||||||
|
|
||||||
|
collections:
|
||||||
|
- name: 'blog'
|
||||||
|
label: 'Blog'
|
||||||
|
folder: 'content/posts'
|
||||||
|
create: true
|
||||||
|
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
|
||||||
|
editor:
|
||||||
|
preview: false
|
||||||
|
fields:
|
||||||
|
- { label: 'Title', name: 'title', widget: 'string' }
|
||||||
|
- { label: 'Publish Date', name: 'date', widget: 'datetime' }
|
||||||
|
- { label: 'Description', name: 'description', widget: 'string' }
|
||||||
|
- { label: 'Body', name: 'body', widget: 'markdown' }
|
|
@ -0,0 +1,13 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta name="robots" content="noindex" />
|
||||||
|
<title>Content Manager</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Include the script that builds the page and powers Decap CMS -->
|
||||||
|
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue