Skip to content

chore: Move to lume-blog #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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