A Next.js-powered frontend for your Mirror blog
This project mimics the Mirror publication design and pulls data from their APIs, allowing you to self-host your Mirror blog on a custom domain.
You can view a demo of this project by visiting m1guelpf.blog, which hosts the my Mirror publication.
Features
- Article list
- Article page
- Code highlighting (using VSCode's rendering engine, allows for custom themes. Currently using
github-light
andgithub-dark
, depending on the publication's theme) - Dark mode (when enabled on Mirror)
- Patience page (when no articles exist)
- Static generation (all pages should load instantly once deployed)
- Static re-generation (new articles should appear without re-deploying)
- Embeds
- Tweet embeds
- YouTube embeds
- Additional embeds (CodePen, JSBin, Gists, etc., not sure if supported by Mirror already)
- NFT embeds
- Bookmark cards (Open Graph)
- NFT crowdfunding
- NFT auctions
- Email list support (when enabled on Mirror)
- Pull content from Arweave
- Write Mirror entry about this project
Development
- Clone this repo in a local directory
- Install dependencies (
yarn install
ornpm install
) - Copy the
.env.example
file to.env.local
, and fill in your mirror subdomain and your Infura Project ID - Start the server! (
yarn dev
ornpm run dev
)
Deploying to Vercel
You can deploy this project to Vercel (and load your own publication!) by clicking the button below:
Once it's ready, you should be able to attach your custom domain from the Vercel settings page.
FAQ
Is this decentralized?
Kind of. While I'm pulling the entry listing and contents from the Arweave chain directly, the publication details come from Mirror's APIs.
Why did you make this?
I like playing with stuff :). I really like Mirror's design, so I decided to create a Ghost theme "inspired" by their design. Once that was finished, I decided to turn that theme into something slightly more useful.
Who are you?
I have another question
Read Building apps with Mirror, an entry I wrote in my own Mirror publication explaining how this project works, and how you can build your own Mirror apps. If you still have questions after that, drop me a line on Twitter.
License
This project is open-sourced software licensed under the MIT license. See the License file for more information.