Skip to content

Commit 6bebbed

Browse files
committed
Add current package versions to sidebar.
1 parent a1d52ca commit 6bebbed

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

api-docs-gen/authors-src.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
stompjs:
2+
name: "StompJS"
3+
avatar: # path of avatar image, e.g. "/assets/images/bio-photo.jpg"
4+
bio: "STOMP library for JavaScript/TypeScript."
5+
location:
6+
email:
7+
links:
8+
- label: "stompjs"
9+
icon: "fab fa-fw fa-github"
10+
url: "https://github.com/stomp-js/stompjs"
11+
- label: "rx-stomp"
12+
icon: "fab fa-fw fa-github"
13+
url: "https://github.com/stomp-js/rx-stomp"
14+
- label: "ng2-stompjs"
15+
icon: "fab fa-fw fa-github"
16+
url: "https://github.com/stomp-js/ng2-stompjs"

api-docs-gen/doc-gen.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ APP_TITLE=`./app-title.rb`
2727
# It will be used by Jekyll pages to show current versions
2828
./pkg-versions.rb > ../_data/versions/$BRANCH.json
2929

30+
# Update versions to be shown in the sidebar
31+
./update-authors.rb
32+
3033
# Adjust the README depending on the branch
3134
sed -e "3i$MESSAGE\n" README-src.md > README.md
3235

api-docs-gen/update-authors.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
3+
require 'yaml'
4+
require 'json'
5+
6+
authors = YAML.load(File.read('authors-src.yml'))
7+
master = JSON.parse(File.read('../_data/versions/master.json'))
8+
9+
authors['stompjs']['links'].each do |link|
10+
x = link['label']
11+
link['label'] = "#{x}@#{master[x]}"
12+
end
13+
14+
File.write('../_data/authors.yml', YAML.dump(authors))

0 commit comments

Comments
 (0)