Skip to content

Commit

Permalink
book thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
JG1VPP committed Nov 8, 2024
1 parent e03287f commit 7124296
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ jobs:
mv books/*.pdf pages
mv books/*.*.svg pages/images
mv files/*/*.png pages/images
mv pages/books/????.md pages
mv pages/books/*.md pages
mv pages/books/*.png pages/images
- run: gh api $ISSUES --paginate > issues.json
working-directory: pages/_data
- uses: actions/configure-pages@v2
Expand Down
7 changes: 4 additions & 3 deletions books/mark.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# output abstract
FileUtils.mkdir_p(name)
File.open(File.join(name, sprintf('%s.md', name)), mode='w') do |file|
File.open(File.join(name, "#{name}.md"), mode='w') do |file|
file.puts('---')
file.puts(conf)
file.puts("redirect_to: #{HOST}/#{File.basename(path)}")
Expand All @@ -56,7 +56,7 @@

# output chapters
subs.each.with_index(1) do |body, index|
File.open(File.join(path, sprintf('%d.md', index)), mode='w') do |file|
File.open(File.join(path, "#{index}.md"), mode='w') do |file|
file.puts('---')
file.puts("title: #{body.lines.first.strip}")
file.puts('---')
Expand All @@ -66,4 +66,5 @@

# create cover
system("pdf2svg #{post} cover.svg 1")
system("inkscape --export-png=#{File.join(path, 'cover.png')} cover.svg")
system("inkscape --export-png=#{File.join(name, "#{name}.png")} cover.svg")
FileUtils.copy(File.join(name, "#{name}.png"), File.join(path, 'cover.png'))
18 changes: 18 additions & 0 deletions pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,22 @@
title: 無線部開発班
subtitle: Journal of Hamradio Informatics
layout: issues
books:
- fava
- mine
- dusk
- chpl
- ats4
---

## Books

<div class='row g-2'>
{% for book in page.books %}
<a href='/{{book}}' class='col-md-3 col-sm-6'>
<img src='images/{{book}}.png' class='img-thumbnail' alt='{{book}}'>
</a>
{% endfor %}
</div>

## Issues

0 comments on commit 7124296

Please sign in to comment.