Warning: This is a work in progress. It is at the stage that it hits many of my personal goals. Still, I expect it to continue to evolve, especially if others are interested in using and contributing to it.
I have opinions too many opinions about blogging.
WordPress is perfectly suitable for most. I recommend you use it. I wanted my content to live in something I understood and felt comfortable modifying from top to bottom. If this sounds like you and you enjoy Rails, I think you will like the experience.
The slight friction of using a static site generator can be good, but it was in the way for me. I have a few features in mind that get us close to most of a static site generator the speed without the friction.
- Pages
- Posts
- Posts can be published on pages
- Built-in search (Litestack!)
- Built-in redirects (you can define them, automatically created when a page or post URL changes)
- Markdown editor with assets drag/drop/paste support
- Clone the repo
- Run
bin/setup(you will need to have Ruby 3.3.5 installed) - Run
bin/dev - Login at /admin. See below for creating your login account.
Provider steps are coming soon. For now, things to remember:
- Ensure your database is backed up. There is a script (bin/backup) that will help you do this for you to S3. Livestream is coming soon.
- I recommend using R2 for your assets, but any S3-compatible provider will work (or you can use local storage). You can configure this in
config/storage.yml. - ENV variables you need to set:
RAILS_MASTER_KEY- This is used to encrypt the session cookie. You can generate a random key withbin/rails secretACTIVE_STORAGE_SERVICE- This is used to configure the storage service. default: localUPLOAD_PREFIX- This is used to prefix uploaded files with a path. This is useful if you are using S3 for your assets. If you are using local storage, you can leave this blank. (only used with S3WithPrefixService)UPLOADED_ASSET_BASE_PATH- This is used to prefix uploaded files with a path (only needed with an S3 compatible service. If you are using local storage, you can leave this blank.)
- See below for instructions on how to create your login account.
This may change, but for now, you can create an account with the following code in the Rails console:
Author.create!(email: "YOUR_EMAIL", password: "YOUR_PASSWORD")Alternatively, if there are no authors in the database or the only author is the seeded temp author, you can navigate to /admin and be prompted to create an author account. Once the author account is created, all others need to be done via the command line.
Also, note that there is no password reset functionality. I did not want to require working email, etc. Additional authors can be created via the command line, and passwords can be changed in the admin interface.
I am very open to suggestions on improving this while keeping it simple and minimizing dependencies.
See the local setup above. Run bin/rails test:all
- Theming
- Shortcodes
- Pushing content to X/Mastodon/Threads/etc
- API / webhooks
- Localization
- Better code formatting
- Better OG image support
There is a monumental amount of open source software that this project relies on. It is impossible to list them all, but there are a few that I am using directly that I want to call out and thank:
- Litestack - Litestack is a lightweight, fast, and flexible web framework for Ruby on Rails.
- Flowbite - Flowbite is a library of accessible, free, and open source Tailwind CSS components (and of course Tailwind CSS itself).
- ViewComponentContrib - ViewComponentContrib is a collection of useful ViewComponent extensions.