🌐 Next.js website with text-file content management
- Overview
- Content File Structure
- Inline Styling with Custom Tags
- How It Works in Code
- Usage
- Troubleshooting
- License
- Edit everything through
content.txt
files - Multi-language ready (i18n via folder structure)
- Built-in components for:
- Project showcases
- Responsive embeds
- Styled links
- Custom text formatting
- Automatic year replacement in footer
- Zero database required
public/
en/ # English content
content.txt
es/ # Spanish content
content.txt
pl/ # Polish content
content.txt
Basic template:
<nav>
Site Title
Menu1#section1
Menu2#section2
</nav>
<section id="section1" wide="4">
<title>Section Title</title>
Content with <style text-blue-500>styled text</style>
</section>
<footer>
%year% - <link url="https://github.com" name="Repository"/>
</footer>
<style [tailwind-classes]>content</style>
Example: <style text-purple-500 font-bold>Bold Purple</style>
<embed url="https://youtu.be/..."> (YouTube/Vimeo)
<image url="/image.jpg"> (from public folder)
<link url="https://..." name="Link Text">
Key files:
components/
Card.tsx # Section container
Header.tsx # Navigation parser
Footer.tsx # Year replacement
utils/
parseContent.ts # Content parser with:
- Tag detection
- Section splitting
- Style mapping
Content parsing flow:
- Read
content.txt
- Split into nav/sections/footer
- Convert custom tags to React components
- Apply Tailwind classes dynamically
- Clone repo
git clone https://github.com/your-repo.git
- Edit content
nano public/en/content.txt
- Add languages
mkdir public/es && cp public/en/content.txt public/es/
- Run dev server
npm run dev
Content not updating?
- Ensure file is in correct locale folder
- Check for unclosed tags
- Restart dev server if making structural changes
Custom tags not rendering?
- Verify proper tag syntax:
<tag attribute="value"/>
- Check console for parsing errors
- Ensure attributes use double quotes
Styling not applying?
- Confirm valid Tailwind classes
- Check for conflicting classes
- Verify
<style>
tags are properly closed
MIT License - Free for personal/commercial use