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.
- 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)
- Email list support (when enabled on Mirror)
- Pull content from Arweave
- Write Mirror entry about this project
- Clone this repo in a local directory
- Install dependencies (
pnpm install
) - Copy the
.env.example
file to.env.local
, and fill in your mirror subdomain and an RPC URL - Start the server! (
pnpm dev
)
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.
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?
👋 Hi! I'm Miguel Piedrafita, an 22-year-old maker. You can follow my journey and all the little things I make on the way on Twitter.
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.
This project is open-sourced software licensed under the MIT license. See the License file for more information.