From 9396c97129f1ce971543be098b4715fb2e78329d Mon Sep 17 00:00:00 2001 From: Toshimaru Date: Fri, 26 Sep 2025 17:19:09 +0900 Subject: [PATCH 1/6] Ignore .env --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index badbc02f6c..cb72b705a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ _site .sass-cache +.env From b0ea1e4d1a25961876852896b45086304bf9214b Mon Sep 17 00:00:00 2001 From: Toshimaru Date: Fri, 26 Sep 2025 17:50:16 +0900 Subject: [PATCH 2/6] Create .env.sample --- .env.sample | 1 + 1 file changed, 1 insertion(+) create mode 100644 .env.sample diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000000..73b8208afd --- /dev/null +++ b/.env.sample @@ -0,0 +1 @@ +RUBY_VERSION=2.7 From 1146f4c088f24399510bcb6307b521ccab190429 Mon Sep 17 00:00:00 2001 From: Toshimaru Date: Fri, 26 Sep 2025 17:56:44 +0900 Subject: [PATCH 3/6] docs: Add Docker usage instructions to README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add section explaining how to run the project with Docker Compose, including examples for different Ruby versions and development server. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 218032b5cf..563e079cf3 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,26 @@ There are some enhancements in addition to SEO. - [ ] Comment System - [ ] etc. (see. https://github.com/railsdoc/railsdoc.github.io/issues) -## Feature Request +## Docker Usage + +You can run this project using Docker Compose: + +```bash +# Run the application +docker compose run --rm app bundle exec rake + +# Run with a specific Ruby version +RUBY_VERSION=3.3 docker compose run --rm app bundle exec rake + +# Run Jekyll server for development +docker compose run --rm --service-ports app bundle exec jekyll serve --host 0.0.0.0 +``` + +The Docker setup uses the official Ruby image and includes: +- Ruby with YJIT enabled for better performance +- Automatic bundle installation +- Volume mounting for live development + +## Feature Request Please create an [issue](https://github.com/railsdoc/railsdoc.github.io/issues). From 755a00a58186cf41cd6b881f724bf40fb95ea545 Mon Sep 17 00:00:00 2001 From: Toshimaru Date: Sun, 28 Sep 2025 04:29:41 +0900 Subject: [PATCH 4/6] docs: Setup/Build/Serve --- README.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 563e079cf3..47dc4d6007 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# [railsdoc.github.io](https://railsdoc.github.io/) +# [railsdoc.github.io](https://railsdoc.github.io/) [![CI](https://github.com/railsdoc/railsdoc.github.io/actions/workflows/ci.yml/badge.svg)](https://github.com/railsdoc/railsdoc.github.io/actions/workflows/ci.yml) [![Deploy](https://github.com/railsdoc/railsdoc.github.io/actions/workflows/deploy.yml/badge.svg)](https://github.com/railsdoc/railsdoc.github.io/actions/workflows/deploy.yml) [![Netlify Status](https://api.netlify.com/api/v1/badges/c964029a-6d5a-4f3a-95e9-d35830a2fe83/deploy-status)](https://app.netlify.com/sites/railsdoc-preview/deploys) -railsdoc.github.io is yet another Rails API documentation website. +[railsdoc.github.io](https://railsdoc.github.io/) is yet another Rails API documentation website. ## Project Goal @@ -24,6 +24,28 @@ There are some enhancements in addition to SEO. - [ ] Comment System - [ ] etc. (see. https://github.com/railsdoc/railsdoc.github.io/issues) +## Setup + +```console +$ bundle install +``` + +## Build docs + +```console +$ rake build +``` + +This command generates Rails docs with `default_rails_version` defined in `_config.yml`. + +## Serve docs + +Serve html under `src` directory. + +```console +$ bundle exec jekyll server +``` + ## Docker Usage You can run this project using Docker Compose: From 9cf86ce07aebc7c08f88479fd01114d551f7c2a7 Mon Sep 17 00:00:00 2001 From: Toshimaru Date: Sun, 28 Sep 2025 04:51:21 +0900 Subject: [PATCH 5/6] docs: Simplify docker document --- README.md | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 47dc4d6007..b245428f60 100644 --- a/README.md +++ b/README.md @@ -32,39 +32,36 @@ $ bundle install ## Build docs +For the latest Rails version: + ```console $ rake build ``` This command generates Rails docs with `default_rails_version` defined in `_config.yml`. -## Serve docs - -Serve html under `src` directory. +For specific Rails versions: ```console -$ bundle exec jekyll server +$ rake build_multi[5.2,6.0,6.1] ``` -## Docker Usage +### Using docker for the older Rails build -You can run this project using Docker Compose: +Set `RUBY_VERSION` in `.env` file and run `docker compose`. -```bash -# Run the application -docker compose run --rm app bundle exec rake +```console +$ cp .env.example .env +$ docker compose run app bash -c 'rake build_multi[5.2]' +``` -# Run with a specific Ruby version -RUBY_VERSION=3.3 docker compose run --rm app bundle exec rake +## Serve docs -# Run Jekyll server for development -docker compose run --rm --service-ports app bundle exec jekyll serve --host 0.0.0.0 -``` +Serve html under `src` directory. -The Docker setup uses the official Ruby image and includes: -- Ruby with YJIT enabled for better performance -- Automatic bundle installation -- Volume mounting for live development +```console +$ bundle exec jekyll server +``` ## Feature Request From 0176477a55f7612fd59315f0e617436bb415591d Mon Sep 17 00:00:00 2001 From: Toshimaru Date: Sun, 28 Sep 2025 05:03:17 +0900 Subject: [PATCH 6/6] fix: Fix file name Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b245428f60..8c977f332d 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ $ rake build_multi[5.2,6.0,6.1] Set `RUBY_VERSION` in `.env` file and run `docker compose`. ```console -$ cp .env.example .env +$ cp .env.sample .env $ docker compose run app bash -c 'rake build_multi[5.2]' ```