Skip to content

Commit ec7870a

Browse files
authored
Merge pull request #156 from toshimaru/add-badges
Generate docs for Rails v7.0, v7.1 / docs: Add badges
2 parents 808c276 + 14c868f commit ec7870a

File tree

4,667 files changed

+567037
-86669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,667 files changed

+567037
-86669
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22

3-
on: [pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
48

59
jobs:
610
jekyll-build:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# [railsdoc.github.io](https://railsdoc.github.io/)
22

33
[![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)
4+
[![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)
45
[![Netlify Status](https://api.netlify.com/api/v1/badges/c964029a-6d5a-4f3a-95e9-d35830a2fe83/deploy-status)](https://app.netlify.com/sites/railsdoc-preview/deploys)
56

67
railsdoc.github.io is yet another Rails API documentation website.

Rakefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,19 @@ def generate_src(target_version:)
8383
cp_r copy_sources, target_dir
8484

8585
cd target_dir do
86+
# Generate index.html
8687
if Gem::Version.new(target_version) >= Gem::Version.new('7.1')
8788
cp NEW_INDEX_HTML, 'index.html'
88-
return
89+
else
90+
cp INDEX_HTML, 'index.html'
8991
end
9092

91-
cp INDEX_HTML, 'index.html'
9293
# Prepend version number to the absolute path in navigation.html
93-
content = File.read('navigation.html')
94-
content.gsub!('<a href="/', "<a href=\"/#{target_version}/")
95-
File.write('navigation.html', content)
94+
unless target_version == default_rails_version
95+
content = File.read('navigation.html')
96+
content.gsub!('<a href="/', "<a href=\"/#{target_version}/")
97+
File.write('navigation.html', content)
98+
end
9699
end
97100
end
98101

_config.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ defaults:
3131
- scope:
3232
path: ""
3333
values:
34-
version: 7.1
34+
version: 7.2
3535
image: https://avatars.githubusercontent.com/u/4223
3636
toc: true
3737
root_path: '/'
38+
- scope:
39+
path: "7.1"
40+
values:
41+
version: 7.1
42+
root_path: '/7.1/'
3843
- scope:
3944
path: "7.0"
4045
values:

0 commit comments

Comments
 (0)