Skip to content

Commit

Permalink
chore: Move to lume-blog
Browse files Browse the repository at this point in the history
  • Loading branch information
m1sk9 committed Aug 25, 2024
1 parent 00d295d commit ed369f0
Show file tree
Hide file tree
Showing 16 changed files with 959 additions and 355 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: Deploy

on:
push:
Expand All @@ -10,7 +10,7 @@ permissions:
contents: read

jobs:
test:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -20,9 +20,13 @@ jobs:
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Build
run: deno task build

- name: Deploy to Deno Deploy
uses: denoland/deployctl@v1
with:
project: pulsate-blog
entrypoint: main.ts
entrypoint: serve.ts
import-map: "./deno.jsonc"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
_site
_cache
.DS_Store
6 changes: 3 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"recommendations": [
"denoland.vscode-deno"
]
"recommendations": [
"denoland.vscode-deno"
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"deno.enable": true
"deno.enable": true
}
12 changes: 0 additions & 12 deletions README

This file was deleted.

31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Pulsate Blog

[![CI](https://github.com/pulsate-dev/blog/actions/workflows/ci.yaml/badge.svg)](https://github.com/pulsate-dev/blog/actions/workflows/ci.yaml)
[![Deploy](https://github.com/pulsate-dev/blog/actions/workflows/deploy.yaml/badge.svg)](https://github.com/pulsate-dev/blog/actions/workflows/deploy.yaml)

Pulsate の開発情報などを発信するブログ. [`blog.pulsate.dev`](https://blog.pulsate.dev) で公開されています. コンテンツの投稿は Pulsate プロジェクトチームのみが行うことができます.

----

1. `src/posts` に新しい Markdown ファイルを作成する.
2. ファイルの先頭に以下のようなメタデータを記述する.
- `title`: 記事のタイトルを指定する.
- `date`: 記事の公開日を指定する.
- `author`: 記事の著者を指定する.
- `tags`: 記事のタグを指定する.
- リリースノートの場合は `release` タグを指定する.
- `comments.src`: 記事のコメントソースを指定する. Pulsate をはじめとする ActivityPub インスタンスに対応. 必ずしも指定する必要はない.
- `draft`: 下書きの場合は `true` を指定する.

```markdown
---
title: The example post
date: '2023-09-10'
author: Sho Sakuma
tags:
- ActivityPub
comments:
src: 'https://mstdn.mand.io/@m1sk9/0000000'
draft: true
---
```
10 changes: 10 additions & 0 deletions _config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import lume from "lume/mod.ts";
import blog from "blog/mod.ts";

const site = lume({
src: './src',
});

site.use(blog());

export default site;
14 changes: 10 additions & 4 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
"tasks": {
"dev": "deno run --allow-net --allow-read --allow-env --watch main.ts --dev",
"serve": "deno run --allow-net --allow-read --allow-env --no-check main.ts",
"create": "cp template.md posts/$(date + '%Y-%m-%d')-post-title.md",
"lume": "echo \"import 'lume/cli.ts'\" | deno run -A -",
"build": "deno task lume",
"serve": "deno task lume -s",
"fmt": "deno fmt .",
"fmt:check": "deno fmt --check .",
"lint": "deno lint"
},
"imports": {
"deno_blog": "https://deno.land/x/[email protected]/blog.tsx"
"lume/": "https://deno.land/x/[email protected]/",
"blog/": "https://deno.land/x/[email protected]/"
},
"compilerOptions": {
"types": [
"lume/types.ts"
]
}
}
Loading

0 comments on commit ed369f0

Please sign in to comment.