Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrwillcom/next-mastodon-gallery
A Next.js powered gallery for Mastodon.
https://github.com/mrwillcom/next-mastodon-gallery
gallery mastodon nextjs
Last synced: about 1 month ago
JSON representation
A Next.js powered gallery for Mastodon.
- Host: GitHub
- URL: https://github.com/mrwillcom/next-mastodon-gallery
- Owner: MrWillCom
- License: mit
- Created: 2023-04-04T14:46:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-09T11:15:08.000Z (5 months ago)
- Last Synced: 2024-08-09T13:44:51.894Z (5 months ago)
- Topics: gallery, mastodon, nextjs
- Language: TypeScript
- Homepage: https://gallery.mrwillcom.com
- Size: 854 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Next Mastodon Gallery
A [Next.js](https://nextjs.org/)-powered gallery for [Mastodon](https://joinmastodon.org/).
[one-click-deploy-url]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FMrWillCom%2Fnext-mastodon-gallery&demo-title=Next%20Mastodon%20Gallery&demo-description=A%20Next.js%20powered%20gallery%20for%20Mastodon.&demo-url=https%3A%2F%2Fgallery.mrwillcom.com%2F&demo-image=https%3A%2F%2Fgithub.com%2FMrWillCom%2Fnext-mastodon-gallery%2Fraw%2Fmain%2Fscreenshots%2Fpreview.png
[**Preview**](https://gallery.mrwillcom.com/) / [One-Click Deploy][one-click-deploy-url]
![Preview screenshot](./screenshots/preview.png)
Preview screenshot of details drawer
## Getting Started
[![Deploy with Vercel](https://vercel.com/button)][one-click-deploy-url]
After deployment, you may need to make changes to [configuration](#configuration).
## Configuration
A ready configuration is in `config.tsx`, options are all commented and typed.
### About Mastodon API query URL
First, you need to get your account ID, according to [Lookup account ID from Webfinger address - Mastodon documentation](https://docs.joinmastodon.org/methods/accounts/#lookup), you can make a request to your instance:
```sh
> curl 'https:///api/v1/accounts/lookup?acct='
{"id":"72358"...}%
^^^^^
account ID
```Then, you can refer to [Get account’s statuses - Mastodon documentation](https://docs.joinmastodon.org/methods/accounts/#statuses), here is an example:
```sh
> # get all statuses tagged with `#photography`, excepted the ones without media attachments.
> curl 'http:///api/v1/accounts//statuses?only_media=true&tagged=photography'
```Once you get a satisfied URL, put it into `query` in `config.tsx`.
## Development
First, run the development server:
```sh
pnpm dev
```Then, open [http://localhost:3000](http://localhost:3000).