• Stars
    star
    194
  • Rank 200,219 (Top 4 %)
  • Language
    TypeScript
  • Created almost 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate a blog from GitHub Issue

showcase

Sairin

Generate a blog from GitHub issue.

One Click Deploy

Deploy with Vercel

Get started

  1. Clone the starter template
$ git clone https://github.com/djyde/sairin-starter.git your_blog

$ cd your_blog && rm .git

# install dependencies

$ npm i
  1. Run the blog

Before running, you need to set these environment variable by creating a .env:

# run the blog

$ npm run dev
  1. Export the blog as a static site
$ npm run export

The static site will be ouput to /out

Documentation

sairin.config.ts

  • siteConfig
    • title (required) Your blog title
    • author The author name of your blog. The repo owner login id will be set by default
    • url The URL of your blog. Start with http:// or https://. This field is required if you want to enable RSS.
  • theme (required)
  • themeConfig A config object passed to the theme
  • allowUsers string[] An array of GitHub user login id that allowed to publish blog post. By default, only issues created by the repo owner will be published on the blog.

Environment Variables

  • GITHUB_TOKEN (required) Personal Access Token to call GitHub API
  • REPO The repository which will be fetch blog posts from (e.g owner/repo). By default it will use the repo that created by Vercel.

RSS Support

Sairin support RSS out of the box. You need to set url on the sairin.config.ts to enable it:

// sairin.config.ts

export default {
  siteConfig: {
    title: 'Sairin',
+   url: 'http://your-site.com'
  },
} as SairinConfig;

The RSS feed is on http://your-site.com/rss.xml.

FAQ

Need I redeploy the Vercel project after the issue updated?

No.

How long will take to update the latest content after the issue content update?

Blog will be updated every 1 minute.

Theme Development

Sairin supports custom theme. But the API is not stable now. If you still want to try to develope a theme, you could see the source code of the built-in theme sairin-theme-minimal.

Build

Development

Sairin use pnpm to organize the packages, you need to install pnpm first.

Install the dependencies:

$ pnpm i

Create a .env file on example/:

GITHUB_TOKEN= # need to provide a GitHub access token when developing, or it will reach the API request rate limit.
REPO=djyde/sairin # you can change to any repo for debugging

Run dev command:

$ pnpm run dev --filter "*" --parallel

This command will run a blog on localhost.

More Repositories

1

cusdis

lightweight, privacy-friendly alternative to Disqus.
TypeScript
2,421
star
2

WebShell

Bundle web apps to native OS X app
Swift
1,505
star
3

ToProgress

A lightweight top progress bar
JavaScript
524
star
4

V2EX-API

V2EX Non-official API list
369
star
5

StoreDB

[DEPRECATED] Make localStorage do more things.
JavaScript
330
star
6

Picas

Generate Wordmark Logo with Google Fonts
JavaScript
329
star
7

sinatine

weibo HTML5 for macOS
JavaScript
299
star
8

ossart

Print your GitHub activity as an artwork
TypeScript
212
star
9

PureSlider

A lightweight, no-dependency image slider library
JavaScript
186
star
10

iCultus

Alternative menubar calendar for OS X
Vue
174
star
11

serlina

A progressive React serverside-rendering framework.
TypeScript
139
star
12

notepal

A simple tool to import/export your book note
TypeScript
132
star
13

Catchem

Buy APPs at the right time
JavaScript
114
star
14

koy

Markdown previewer
CSS
97
star
15

plastic-editor

A block-based editor
Svelte
90
star
16

cans

🍻 A framework for building React MobX application
JavaScript
83
star
17

WebClip

Plugable popup in browser.
HTML
71
star
18

nextjs-saas-starter

Nextjs SaaS boilerplate
TypeScript
67
star
19

snp

VS Code code snippet generator
Go
64
star
20

HotelX

typicode/hotel OS X menu bar app
Swift
60
star
21

V2HOT

[DEPRECATED] V2EX每日热议 for Android
Java
56
star
22

markbox

Parse your code in markdown into CodeSandbox.
TypeScript
52
star
23

Statut

Web application in OS X status bar
Swift
42
star
24

plastic

Another note app. Block based, bi-directional link, works on local.
Svelte
42
star
25

Pciano

Play pop piano on computer keyboard!
JavaScript
33
star
26

AMAzingTalk

和有经验的人一对一咨询
Nunjucks
33
star
27

We2EX

V2EX for Wechat App
JavaScript
30
star
28

node-maven

Getting maven repo url easily
JavaScript
29
star
29

everfeed

Simple RSS reader base on AngularJS & StoreDB
CSS
28
star
30

RocketLog

Bring console to terminal
JavaScript
26
star
31

front

A simple, hackable frontpage for hackers
JavaScript
25
star
32

MoniCoin

虚拟比特币交易
JavaScript
25
star
33

file-test

Test the generated directory structure and file content.
JavaScript
23
star
34

V2HOT-Plus

V2HOT Plus
Java
22
star
35

fullstack-nextjs-in-action

Book: Fullstack Next.js in Action
HTML
17
star
36

clean-nm

Clean your node_modules legacy 💩
JavaScript
17
star
37

ExMarket

Chinese Chrome Store(已停止更新)
JavaScript
16
star
38

node-baidu-translate

Baidu translate SDK for Node.js
JavaScript
15
star
39

esbin

Another jsbin but using ES Module
TypeScript
15
star
40

kge-desktop

全民k歌 for Desktop
TypeScript
15
star
41

fullstack-nextjs-in-action-example

TypeScript
14
star
42

MagPi

树莓派电子杂志MagPi中文翻译
13
star
43

rehux

React state management made simple
JavaScript
13
star
44

blog-2022

Astro
13
star
45

snippets

my personal code snippets
12
star
46

cown

Qiniu bucket manager and uploader
JavaScript
12
star
47

FilterAwesome

CSS filter library
CSS
11
star
48

binary-tree-visualizer

TypeScript
11
star
49

react-router-menu

Ant Design Menu React Router binding
TypeScript
11
star
50

blog-2017

new blog for 2017
Vue
9
star
51

tree-util

A library for working with n-ary tree
JavaScript
9
star
52

blog-2020

Nunjucks
9
star
53

docker-zimuzu

Zimuzu app Docker image
Dockerfile
9
star
54

icondog

An open-source icons manager for open-source icons
TypeScript
9
star
55

umi-plugin-autopolyfill

umi plugin for polyfill.io
JavaScript
8
star
56

TSpoon

Writing HammeSpoon scripts with TypeScript.
Lua
8
star
57

cusdis-telegram-bot

JavaScript
8
star
58

Todo4Realm

A simple todo app use Realm
Java
6
star
59

awesome-cusdis

6
star
60

awesome-sublime-packages

Collecting awesome sublime packages which speed up coding
6
star
61

lean-hook

JavaScript
6
star
62

hackernews-refinder

TypeScript
6
star
63

Synology_DS216j_Workshop

5
star
64

vue-native

5
star
65

eleventy-plugin-modern

JavaScript
5
star
66

sopa

Local package manager for web
JavaScript
5
star
67

push-if

push element to the array if true
JavaScript
5
star
68

vue-fundamentals

Building Large Application with Vue.js
Shell
4
star
69

genlink

Generate redirect link (in static way)
TypeScript
4
star
70

wechat-shell

Web Wechat on OS X
Swift
4
star
71

Gulliver

An android APP for managing time that taken by tripping.
Java
4
star
72

ama

Ask me anything!
3
star
73

note-app

TypeScript
3
star
74

React-Quill

Quilljs in React
JavaScript
3
star
75

parcel-typescript-tailwind

A boilerplate
HTML
3
star
76

graphql-jsonplaceholder

JavaScript
3
star
77

json2csv

Easy to use CSV generator
JavaScript
3
star
78

effective-apollo-antd

Created with CodeSandbox
TypeScript
3
star
79

djyde

2
star
80

node-earthlive

Earthlive wallpaper for Node.js
JavaScript
2
star
81

EasyTimer

A class to make Android timer task.
Java
2
star
82

AwesomeSheet

Frontend UIActionSheet
HTML
2
star
83

filefly

All CDN/OSS upload providers in one command.
JavaScript
2
star
84

aboutme

CSS
2
star
85

Repofo

A Chrome extension that show more informations about a Github repo.
JavaScript
2
star
86

jingyun

静云官网
CSS
2
star
87

ZhihuPlus

2
star
88

seamlessM4T-docker

Dockerfile
2
star
89

tronic

An Electron script runtime
TypeScript
2
star
90

unboxing

A tool for making scaffolding tool.
TypeScript
2
star
91

nextjs-sponsorkit

TypeScript
2
star
92

findRoad

JavaScript
2
star
93

smartclub

CSS
2
star
94

Maria

JavaScript
2
star
95

RIH

Organize your images resources
Vue
2
star
96

sql-hierarchy-example

TypeScript
2
star
97

NicoJS

Web Bubble
JavaScript
2
star
98

earthlivejs

Fetch photo of the earth every 5 minutes from himawari-8
JavaScript
2
star
99

legend-of-david-chiu

赌士列传: 老邱传奇
2
star
100

sao-tm

JavaScript
2
star