Skip to content

Commit

Permalink
Merge pull request #1 from pulsate-dev/move-to-lume-blog
Browse files Browse the repository at this point in the history
chore: Move to lume-blog
  • Loading branch information
m1sk9 authored Aug 25, 2024
2 parents 00d295d + 7b4a0d5 commit 17ae91c
Show file tree
Hide file tree
Showing 14 changed files with 911 additions and 351 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ jobs:
- name: Run lint
run: |
deno task lint
- name: Run build
run: |
deno task build
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
12 changes: 0 additions & 12 deletions README

This file was deleted.

34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 17ae91c

Please sign in to comment.