Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haileyok/blug
My little ATProtocol blog using Remix, Tailwind, and Redis
https://github.com/haileyok/blug
atproto blog bluesky remix
Last synced: 7 days ago
JSON representation
My little ATProtocol blog using Remix, Tailwind, and Redis
- Host: GitHub
- URL: https://github.com/haileyok/blug
- Owner: haileyok
- Created: 2024-04-14T09:12:24.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-11-12T06:41:56.000Z (about 2 months ago)
- Last Synced: 2024-12-15T03:10:32.490Z (19 days ago)
- Topics: atproto, blog, bluesky, remix
- Language: TypeScript
- Homepage:
- Size: 1.86 MB
- Stars: 75
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blug - An ATProtocol Blog
A simple little blog that pulls posts from your PDS, using the `com.whtwnd.blog.entry` lexicon. Uses Redis to keep them
cached for a bit, in case you're popular and don't want to be constantly polling your PDS.```ts
interface WhtwndBlogEntryRecord {
$type: 'com.whtwnd.blog.entry'
content?: string
createdAt: string
theme?: string
title: string
ogp?: {
height: number | null
url: string | null
width: number | null
}
}interface WhtwndBlogEntryView {
rkey: string
cid: string
title: string
content?: string
createdAt: string
banner?: string
}
```## Configuration
Just a few things are needed in your `.env` file.
```shell
ATP_SERVICE=https://pds.haileyok.com/
ATP_IDENTIFIER=haileyok.com
ATP_DID=did:plc:oisofpd7lj26yvgiivf3lxsi
```- `ATP_SERVICE` is the URL of your PDS. It's probably hosted by Bluesky. Find it at [internect.info](https://internect.info).
- `ATP_IDENTIFIER` is your handle. It's used to know which repo to get records from.
- `ATP_DID` is...your DID. Again, find it at [internect.info](https://internect.info). Used to get your Bluesky profile
(I use this just to get the already-hosted copy of your profile picture. You could rewrite this if you wanted to, would
be faster too).You also need to have Redis running. I didn't bother adding configuration for it, so if you want to change where it's
hosted at check `src/redis/redis.ts`.```shell
# macos
brew install redis
brew services start redis# ubuntu
sudo apt-get install redis-server
sudo systemctl start redis# centos
sudo yum install redis
sudo systemctl start redis
```## Development
Just run the vite server, you know, like usual?
```shellscript
yarn run dev
```## Deployment
Make sure you have `dotenv-cli` installed.
```shell
npm install -g dotenv-cli
```Then build and serve.
```
yarn build
yarn start
```## Creating Posts
There's various ways you could do this. I just use a Markdown editor and then manually save them with `createRecord`.
You can also use the editor at [whtwnd's website](https://whtwnd.com/edit) to create them.