- Serves MDX content so you can use any version control system to manage your content
- Multiple categories of posts based on directory structure
- API endpoints for listing posts and retrieving individual posts
- Rate limiting, logging and compression for production
- Bun v1.1.31 or later
-
Clone the repository:
git clone https://github.com/climactic/texto.git cd texto
-
Install dependencies:
bun i
-
Create a
.env
file based on the.env.example
and adjust the values as needed:cp .env.example .env
-
Write some content in the
content
directory and start the server:bun dev
-
Access the API at
http://localhost:3000/api/posts
-
Get a post by its slug:
http://localhost:3000/api/posts/{category}/{slug}
The following environment variables can be set in the .env
file:
PORT
: The port on which the server will run (default: 3000)RATE_LIMIT_MAX
: Maximum number of requests per duration (default: 100)RATE_LIMIT_DURATION
: Duration for rate limiting in milliseconds (default: 60000)RENDER_HTML
: Set totrue
to render markdown content as HTML (default: false)
This project is licensed under the Apache2.0 License. See the LICENSE file for details.