Sunday, June 16, 2024

Creating a new blog with Texted

Programming LanguageCreating a new blog with Texted


Overview

Creating a new self-hosted blog with texted is super simple. This is a tutorial explaining how to do it.

Pre-requisites

Install Rust if you’ve now already done

Rust – Getting started

Installing Texted

cargo install texted
Enter fullscreen mode

Exit fullscreen mode

Bootstrapping a new blog

# Let's create a new directory for our new blog
mkdir ~/my-awesome-blog && cd ~/my-awesome-blog
# And now create the skeleton of a fully functional blog
texted-tool bootstrap --out-dir .
Enter fullscreen mode

Exit fullscreen mode

Now, let’s run and test it.

# Inside the same ~/my-awesome-blog directory, run
texted
Enter fullscreen mode

Exit fullscreen mode

And open in your browser http://127.0.0.1:8001/

Adding a new post

Texted by default caches all urls and posts for best performance. Please quit texted and run again to see new posts in the listing.
If you want to disable rendering cache to see changes in the post content without restarting, change
rendering_cache_enabled = false in the texted.toml configuration file

# Still inside the same ~/my-awesome-blog directory, run
pushd posts/

# This will create one directory such as 20240428_how_to_write_a_new_blog_post
# with a file index.md inside.
texted-tool post --title "How to write a new blog post" -o dir

# And let's run texted again
popd
texted
Enter fullscreen mode

Exit fullscreen mode

You now have a new post available in the post list


This post was adapted from Texted project

Check out our other content

Check out other tags:

Most Popular Articles