diff --git a/.gitignore b/.gitignore index 364fdec..46f5006 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -public/ +public/* diff --git a/content/posts/2000-01-01-draft.md b/content/posts/2000-01-01-draft.md new file mode 100644 index 0000000..55a4f47 --- /dev/null +++ b/content/posts/2000-01-01-draft.md @@ -0,0 +1,9 @@ ++++ +date = 2000-01-01T00:00:00Z +description = "" +draft = true +slug = "draft" +title = "draft" ++++ + +## body \ No newline at end of file diff --git a/content/posts/2023-10-23-changeme.md b/content/posts/2023-10-23-changeme.md new file mode 100644 index 0000000..60887d5 --- /dev/null +++ b/content/posts/2023-10-23-changeme.md @@ -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라지만 외부 서비스에 넣는게 좀 찝찝해서 \ No newline at end of file diff --git a/new.sh b/new.sh new file mode 100755 index 0000000..933f4a9 --- /dev/null +++ b/new.sh @@ -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 diff --git a/static/admin/config.yml b/static/admin/config.yml new file mode 100644 index 0000000..e61b859 --- /dev/null +++ b/static/admin/config.yml @@ -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' } \ No newline at end of file diff --git a/static/admin/index.html b/static/admin/index.html new file mode 100644 index 0000000..fd89b7e --- /dev/null +++ b/static/admin/index.html @@ -0,0 +1,13 @@ + + + + + + + Content Manager + + + + + + \ No newline at end of file diff --git a/test b/test new file mode 100644 index 0000000..68e2a68 --- /dev/null +++ b/test @@ -0,0 +1,9 @@ ++++ +date = 2023-10-23T18:42:17+09:00 +description = "" +draft = true +slug = "draft" +title = "draft" ++++ + +## body