copy assets from newslettter
This commit is contained in:
parent
f21fac5556
commit
645dc1febe
2 changed files with 11 additions and 8 deletions
|
|
@ -17,4 +17,15 @@ task :copy_newsletter_posts do
|
|||
File.write File.join(File.dirname(__FILE__), '../../_posts/', post["name"]), content
|
||||
sleep 2
|
||||
end
|
||||
|
||||
file = open('https://api.github.com/repos/adafruit/circuitpython-weekly-newsletter/contents/assets').read
|
||||
|
||||
assets = JSON.parse(file)
|
||||
|
||||
assets.each do |asset|
|
||||
response = JSON.parse(open(asset["url"]).read)
|
||||
content = Base64.decode64(response["content"])
|
||||
File.write File.join(File.dirname(__FILE__), '../../assets/', asset["name"]), content
|
||||
sleep 2
|
||||
end
|
||||
end
|
||||
|
|
|
|||
8
news.md
8
news.md
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
# Feel free to add content and custom Front Matter to this file.
|
||||
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
|
||||
|
||||
layout: news
|
||||
---
|
||||
|
||||
News Content
|
||||
Loading…
Reference in a new issue