Skip to content

Commit c27ef7f

Browse files
authored
Fix missing images on the documentation website (#1455)
It's caused by 2 reasons: 1. The README's image paths don't exist under the `/docs` directory. 2. The Snapper template has a CSP rule that blocks local images. 2 has been fixed via Shopify/rdoc#15 This commit addresses 1 by copying the images that README uses to the `/docs` directory in the doc publishing workflow. The upside of this approach is that it's simple and we don't need to change the README's image paths, nor move the images around. The downside is that we still can't see the images locally. But I think it's a reasonable trade-off.
1 parent a975732 commit c27ef7f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/publish_docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
- name: Generate documentation
2727
run: bundle exec rake rdoc
2828

29+
- name: Copy README images to the docs folder
30+
run: |
31+
mkdir docs/vscode
32+
cp vscode/icon.png docs/vscode/icon.png
33+
cp -R vscode/extras docs/vscode/
34+
2935
- name: Commit to gh-pages
3036
run: |
3137
git add docs -f

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: https://github.com/Shopify/rdoc.git
3-
revision: 360dd09cdd025278e3f8156ca895395325f54d7b
3+
revision: dbabc13c8ceea0375bf01c6652ca3c5175230c5b
44
branch: create_snapper_generator
55
specs:
66
rdoc (6.6.2)

0 commit comments

Comments
 (0)