next-tribune-blog
v2.0.0
Published
Automatic blog generator for Next.js from Tribune.sh blockchain articles
Maintainers
Readme
next-tribune-blog
A TypeScript package for Next.js that automatically generates blog pages from your Tribune.sh blockchain articles during build time.
Features
- 🚀 Simple configuration - just add your wallet address
- 📝 Automatic blog generation from YOUR Tribune.sh articles
- 🎨 Beautiful default styles with dark mode support
- 📅 Automatic date sorting
- 🔍 SEO-friendly with metadata support
- 💪 Full TypeScript support
- 🎯 Next.js App Router compatible
- ⛓️ Pre-configured for Tribune on Abstract mainnet
- 🔗 Direct links to Tribune.sh and Abstract Scan
Installation
npm install next-tribune-blog
# or
yarn add next-tribune-blog
# or
bun add next-tribune-blogQuick Start
After installation, the package automatically updates your next.config.ts. You just need to:
- Set your wallet address in
next.config.ts:
const tribuneBlogPlugin = new NextTribuneBlogPlugin({
// Replace with your actual wallet address
walletAddress: '0xYourWalletAddress', // <-- CHANGE THIS!
});- Build your project:
npm run build- Run the development server:
npm run dev- Visit your blog:
http://localhost:3000/blogHow it Works
- During build time, the plugin connects to Tribune.sh on Abstract mainnet
- Fetches all articles published by your wallet address
- Generates static blog pages with beautiful styling
- Creates a blog listing page and individual article pages
Configuration Options
const tribuneBlogPlugin = new NextTribuneBlogPlugin({
// Your wallet address (REQUIRED)
walletAddress: '0xYourWalletAddress',
// Output directory (optional, default: 'src/app/blog')
outputDir: 'src/app/blog',
});The Tribune contract address and RPC URL are pre-configured for Abstract mainnet.
Generated Pages
The plugin generates:
/blog- Blog listing page with all your articles/blog/[slug]- Individual article pages
Each article includes:
- Cover image (if available)
- Title and description
- Publication date
- Author wallet address (linked to Abstract Scan)
- Link to view on Tribune.sh
- Link to view article token on Abstract Scan
Updating Articles
Articles are fetched at build time for optimal performance. To update your blog with new articles:
npm run buildDevelopment
# Clone the repository
git clone https://github.com/yourusername/next-tribune-blog.git
cd next-tribune-blog
# Install dependencies
npm install
# Build the package
npm run buildLicense
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues and feature requests, please use the GitHub issues page.
