From e1900285e11b735bd42fa685c8e360e4c784d828 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Sat, 26 Dec 2020 13:11:01 -0600 Subject: [PATCH] Issue #41: Prepare for thumbnails to work. --- .github/workflows/github-pages.yml | 38 ++++++++++++++++ CONTRIBUTING.md | 4 +- Gemfile | 1 + Gemfile.lock | 4 ++ .../exacq-ti-xio3130-2-port-pcie-switch.md | 2 +- _cards_adapter/hlt-1x-16x-extension-cable.md | 2 +- .../iocrest-si-pex60016-2-port-pcie-switch.md | 2 +- _cards_adapter/pce164p-no3-ver-006-riser.md | 2 +- _cards_adapter/pce164p-no3-ver-888-riser.md | 2 +- _cards_adapter/pce164p-no6-ver-008s-riser.md | 2 +- _cards_gpu/evga-geforce-gtx-750ti.md | 2 +- _cards_gpu/sapphire-radeon-rx550-2gb.md | 2 +- _cards_gpu/visiontek-radeon-5450-1gb.md | 2 +- _cards_gpu/zotac-geforce-gt710-1gb.md | 2 +- _cards_m2/mzhou-nvme-m2-ssd-m-key-adapter.md | 2 +- _cards_m2/ngff-m-key-ssd-adapter.md | 2 +- _cards_m2/xiwai-ngff-m-key-m2-ssd-adapter.md | 2 +- _cards_network/asus-pce-ac51-wifi-5.md | 2 +- _cards_network/asus-xg-c100c-10g.md | 2 +- _cards_network/edup-intel-ax200-wifi-6.md | 2 +- _cards_network/intel-i340-t4-4-port-1g.md | 2 +- .../mellanox-connectx-2-mnpa19-xtr-sfp-10g.md | 2 +- _cards_network/rosewill-rc20001-25gbe.md | 2 +- _cards_storage/asm1061-2-port-adapter.md | 2 +- ...-servraid-br10i-lsi-sas3082e-r-sas-raid.md | 2 +- _cards_storage/iocrest-sata-3-marvell-9215.md | 2 +- ...eratrend-2-port-sata-3-marvell-88se9130.md | 2 +- _cards_usb/a-adwits-vl805.md | 2 +- _cards_usb/inateck-pcie-usb3.md | 2 +- _cards_usb/syba-sd-pex20199.md | 2 +- _config.yml | 1 + _layouts/card.html | 2 +- _plugins/image_thumbnail.rb | 11 +++++ _plugins/post_thumbnail_generator.rb | 43 ++++++++++++++++++ card-template.md | 2 +- ...er-exacq-ti-xio3130-2-port-pcie-switch.jpg | Bin .../adapter-hlt-1x-16x-extension-cable.jpg | Bin ...iocrest-si-pex60016-2-port-pcie-switch.jpg | Bin .../adpater-pce164p-no3-ver-006-riser.jpg | Bin .../adpater-pce164p-no3-ver-888-riser.jpg | Bin .../adpater-pce164p-no6-ver-008s-riser.jpg | Bin .../gpu-evga-geforce-gtx-750ti.jpg | Bin .../gpu-sapphire-radeon-rx550.jpg | Bin .../gpu-visiontek-radeon-5450.jpg | Bin .../gpu-zotac-geforce-gt710.jpg | Bin .../m2-mzhou-m-key-ssd.jpg | Bin .../{card-pictures => }/m2-ngff-m-key-ssd.jpg | Bin .../m2-xiwai-ngff-m-key-ssd.jpg | Bin .../network-asus-pce-ac51.jpg | Bin .../network-asus-xg-c100c.jpg | Bin .../network-edup-intel-ax200.jpg | Bin .../network-intel-i340-t4.jpg | Bin ...network-mellanox-connectx-2-mnpa19-xtr.jpg | Bin .../network-rosewill-rc20001.jpg | Bin .../storage-asm1061-2-port-adapter.jpg | Bin ...servraid-br10i-lsi-sas3082e-r-sas-raid.jpg | Bin .../storage-iocrest-sata-3-marvell-9215.jpg | Bin ...ratrend-2-port-sata-3-marvell-88se9130.jpg | Bin .../usb-a-adwits-vl805.jpg | Bin .../usb-inateck-pcie-usb3.jpg | Bin .../usb-syba-sd-pex20199.jpg | Bin index.md | 13 +++--- 62 files changed, 135 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/github-pages.yml create mode 100644 _plugins/image_thumbnail.rb create mode 100644 _plugins/post_thumbnail_generator.rb rename images/{card-pictures => }/adapter-exacq-ti-xio3130-2-port-pcie-switch.jpg (100%) rename images/{card-pictures => }/adapter-hlt-1x-16x-extension-cable.jpg (100%) rename images/{card-pictures => }/adpater-iocrest-si-pex60016-2-port-pcie-switch.jpg (100%) rename images/{card-pictures => }/adpater-pce164p-no3-ver-006-riser.jpg (100%) rename images/{card-pictures => }/adpater-pce164p-no3-ver-888-riser.jpg (100%) rename images/{card-pictures => }/adpater-pce164p-no6-ver-008s-riser.jpg (100%) rename images/{card-pictures => }/gpu-evga-geforce-gtx-750ti.jpg (100%) rename images/{card-pictures => }/gpu-sapphire-radeon-rx550.jpg (100%) rename images/{card-pictures => }/gpu-visiontek-radeon-5450.jpg (100%) rename images/{card-pictures => }/gpu-zotac-geforce-gt710.jpg (100%) rename images/{card-pictures => }/m2-mzhou-m-key-ssd.jpg (100%) rename images/{card-pictures => }/m2-ngff-m-key-ssd.jpg (100%) rename images/{card-pictures => }/m2-xiwai-ngff-m-key-ssd.jpg (100%) rename images/{card-pictures => }/network-asus-pce-ac51.jpg (100%) rename images/{card-pictures => }/network-asus-xg-c100c.jpg (100%) rename images/{card-pictures => }/network-edup-intel-ax200.jpg (100%) rename images/{card-pictures => }/network-intel-i340-t4.jpg (100%) rename images/{card-pictures => }/network-mellanox-connectx-2-mnpa19-xtr.jpg (100%) rename images/{card-pictures => }/network-rosewill-rc20001.jpg (100%) rename images/{card-pictures => }/storage-asm1061-2-port-adapter.jpg (100%) rename images/{card-pictures => }/storage-ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.jpg (100%) rename images/{card-pictures => }/storage-iocrest-sata-3-marvell-9215.jpg (100%) rename images/{card-pictures => }/storage-teratrend-2-port-sata-3-marvell-88se9130.jpg (100%) rename images/{card-pictures => }/usb-a-adwits-vl805.jpg (100%) rename images/{card-pictures => }/usb-inateck-pcie-usb3.jpg (100%) rename images/{card-pictures => }/usb-syba-sd-pex20199.jpg (100%) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml new file mode 100644 index 000000000..093777843 --- /dev/null +++ b/.github/workflows/github-pages.yml @@ -0,0 +1,38 @@ +# GitHub Action for Jekyll +# +# Runs jekyll build on master and pushes output to gh-pages branch. +# (Then GitHub deploys that static content.) + +name: Build & Deploy to GitHub Pages + +on: + push: + branches: + - master + +jobs: + github-pages: + runs-on: ubuntu-latest + container: ruby:2-buster + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: site/vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + + - name: Install Ruby dependencies. + run: | + gem install bundler + bundle install + working-directory: site + + - name: Build static site with Jekyll. + run: bundle exec jekyll build + working-directory: site + + - name: Deploy static site to gh-pages branch. + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site/_site diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 202f8c709..9db07700b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,12 +12,12 @@ There are many ways to contribute: Add a file named after the card into the appropriate `_cards_[type]` directory. Copy the template out of [`card-template.md`](card-template.md) into this new file. -Add a picture of the card (named the same as the `picture` frontmatter in your card's markdown file) into the images/card-pictures directory, prefixed by `[type]-`. +Add a picture of the card into the `images/` directory, prefixed by `[type]-`, and make sure to reference the full path to the image in the `picture` frontmatter on the card post. For example, for a network card: 1. Make sure there's a GitHub issue that exists for the card. 2. Copy the template into a new file inside `_cards_network`. 3. Fill in the details of the card. - 4. Put a picture of the card named `network-[name-of-card].jpg` inside `images/card-pictures`. + 4. Put a picture of the card named `network-[name-of-card].jpg` inside `images/`. 5. File a PR with your changes. diff --git a/Gemfile b/Gemfile index 4f4a76f6c..cd938de71 100644 --- a/Gemfile +++ b/Gemfile @@ -5,3 +5,4 @@ source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } gem 'github-pages', group: :jekyll_plugins +gem "smartcropper", "~> 0.7.1" diff --git a/Gemfile.lock b/Gemfile.lock index b3fab83ea..3e55353d6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -222,6 +222,7 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.4) + rmagick (4.1.2) rouge (3.23.0) ruby-enum (0.8.0) i18n @@ -238,6 +239,8 @@ GEM faraday (> 0.8, < 2.0) simpleidn (0.1.1) unf (~> 0.1.4) + smartcropper (0.7.1) + rmagick (> 2.11.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) @@ -256,6 +259,7 @@ PLATFORMS DEPENDENCIES github-pages + smartcropper (~> 0.7.1) BUNDLED WITH 2.1.4 diff --git a/_cards_adapter/exacq-ti-xio3130-2-port-pcie-switch.md b/_cards_adapter/exacq-ti-xio3130-2-port-pcie-switch.md index 4adc7c871..ce731fae0 100644 --- a/_cards_adapter/exacq-ti-xio3130-2-port-pcie-switch.md +++ b/_cards_adapter/exacq-ti-xio3130-2-port-pcie-switch.md @@ -1,7 +1,7 @@ --- layout: card title: "Exacq Technologies TI XIO3130 1 to 2 Port PCIe Switch" -picture: "adapter-exacq-ti-xio3130-2-port-pcie-switch.jpg" +picture: "/images/adapter-exacq-ti-xio3130-2-port-pcie-switch.jpg" functionality: "Currently Testing" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/14" diff --git a/_cards_adapter/hlt-1x-16x-extension-cable.md b/_cards_adapter/hlt-1x-16x-extension-cable.md index 18f343543..0fd18df23 100644 --- a/_cards_adapter/hlt-1x-16x-extension-cable.md +++ b/_cards_adapter/hlt-1x-16x-extension-cable.md @@ -1,7 +1,7 @@ --- layout: card title: "HLT PCIe 1x to 16x extension cable" -picture: "adapter-hlt-1x-16x-extension-cable.jpg" +picture: "/images/adapter-hlt-1x-16x-extension-cable.jpg" functionality: "Full" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/14" diff --git a/_cards_adapter/iocrest-si-pex60016-2-port-pcie-switch.md b/_cards_adapter/iocrest-si-pex60016-2-port-pcie-switch.md index f921ea971..e163b27c0 100644 --- a/_cards_adapter/iocrest-si-pex60016-2-port-pcie-switch.md +++ b/_cards_adapter/iocrest-si-pex60016-2-port-pcie-switch.md @@ -1,7 +1,7 @@ --- layout: card title: "I/O Crest SI-PEX60016 1 to 2 Port PCIe Switch" -picture: "adpater-iocrest-si-pex60016-2-port-pcie-switch.jpg" +picture: "/images/adpater-iocrest-si-pex60016-2-port-pcie-switch.jpg" functionality: "Currently Testing" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/14" diff --git a/_cards_adapter/pce164p-no3-ver-006-riser.md b/_cards_adapter/pce164p-no3-ver-006-riser.md index 06bac64f0..15cb6b8c2 100644 --- a/_cards_adapter/pce164p-no3-ver-006-riser.md +++ b/_cards_adapter/pce164p-no3-ver-006-riser.md @@ -1,7 +1,7 @@ --- layout: card title: "Rosewill RCRC-17001 1x to 16x Riser PCE164P-N06 VER 006" -picture: "adpater-pce164p-no3-ver-006-riser.jpg" +picture: "/images/adpater-pce164p-no3-ver-006-riser.jpg" functionality: "Full" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/14" diff --git a/_cards_adapter/pce164p-no3-ver-888-riser.md b/_cards_adapter/pce164p-no3-ver-888-riser.md index 284dcbd29..b5fcb3a51 100644 --- a/_cards_adapter/pce164p-no3-ver-888-riser.md +++ b/_cards_adapter/pce164p-no3-ver-888-riser.md @@ -1,7 +1,7 @@ --- layout: card title: "Generic PCE164P NO3 VER 888 1x to 16x riser" -picture: "adpater-pce164p-no3-ver-888-riser.jpg" +picture: "/images/adpater-pce164p-no3-ver-888-riser.jpg" functionality: "Currently Testing" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/14" diff --git a/_cards_adapter/pce164p-no6-ver-008s-riser.md b/_cards_adapter/pce164p-no6-ver-008s-riser.md index f5a92ce2b..d10e36f2b 100644 --- a/_cards_adapter/pce164p-no6-ver-008s-riser.md +++ b/_cards_adapter/pce164p-no6-ver-008s-riser.md @@ -1,7 +1,7 @@ --- layout: card title: "Generic PCE164P NO3 VER 008S 1x to 16x riser" -picture: "adpater-pce164p-no6-ver-008s-riser.jpg" +picture: "/images/adpater-pce164p-no6-ver-008s-riser.jpg" functionality: "Currently Testing" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/14" diff --git a/_cards_gpu/evga-geforce-gtx-750ti.md b/_cards_gpu/evga-geforce-gtx-750ti.md index 2066b1e48..71bc6bba6 100644 --- a/_cards_gpu/evga-geforce-gtx-750ti.md +++ b/_cards_gpu/evga-geforce-gtx-750ti.md @@ -1,7 +1,7 @@ --- layout: card title: "EVGA GeForce GTX 750 Ti" -picture: gpu-evga-geforce-gtx-750ti.jpg +picture: "/images/gpu-evga-geforce-gtx-750ti.jpg" functionality: "Currently Testing" driver_required: "Yes" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/26" diff --git a/_cards_gpu/sapphire-radeon-rx550-2gb.md b/_cards_gpu/sapphire-radeon-rx550-2gb.md index c03e91237..2fbe3cba0 100644 --- a/_cards_gpu/sapphire-radeon-rx550-2gb.md +++ b/_cards_gpu/sapphire-radeon-rx550-2gb.md @@ -1,7 +1,7 @@ --- layout: card title: "Sapphire Radeon RX 550 2GB PCIe x16" -picture: gpu-sapphire-radeon-rx550.jpg +picture: "/images/gpu-sapphire-radeon-rx550.jpg" functionality: "Currently Testing" driver_required: "Yes" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/6" diff --git a/_cards_gpu/visiontek-radeon-5450-1gb.md b/_cards_gpu/visiontek-radeon-5450-1gb.md index 015bcc025..0017af857 100644 --- a/_cards_gpu/visiontek-radeon-5450-1gb.md +++ b/_cards_gpu/visiontek-radeon-5450-1gb.md @@ -1,7 +1,7 @@ --- layout: card title: "VisionTek Radeon 5450 1GB PCIe x16" -picture: gpu-visiontek-radeon-5450.jpg +picture: "/images/gpu-visiontek-radeon-5450.jpg" functionality: "None" driver_required: "Yes" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/4" diff --git a/_cards_gpu/zotac-geforce-gt710-1gb.md b/_cards_gpu/zotac-geforce-gt710-1gb.md index ecd2b32c2..f56aba707 100644 --- a/_cards_gpu/zotac-geforce-gt710-1gb.md +++ b/_cards_gpu/zotac-geforce-gt710-1gb.md @@ -1,7 +1,7 @@ --- layout: card title: "Zotac GeForce GT 710 1GB PCIe x1" -picture: gpu-zotac-geforce-gt710.jpg +picture: "/images/gpu-zotac-geforce-gt710.jpg" functionality: "None" driver_required: "Yes" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/2" diff --git a/_cards_m2/mzhou-nvme-m2-ssd-m-key-adapter.md b/_cards_m2/mzhou-nvme-m2-ssd-m-key-adapter.md index 833830a30..a83110690 100644 --- a/_cards_m2/mzhou-nvme-m2-ssd-m-key-adapter.md +++ b/_cards_m2/mzhou-nvme-m2-ssd-m-key-adapter.md @@ -1,7 +1,7 @@ --- layout: card title: "MZHOU NVMe M.2 SSD M Key to PCIe 1x Adapter" -picture: "m2-mzhou-m-key-ssd.jpg" +picture: "/images/m2-mzhou-m-key-ssd.jpg" functionality: "Full" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/TODO" diff --git a/_cards_m2/ngff-m-key-ssd-adapter.md b/_cards_m2/ngff-m-key-ssd-adapter.md index 58883bd91..58d3013c5 100644 --- a/_cards_m2/ngff-m-key-ssd-adapter.md +++ b/_cards_m2/ngff-m-key-ssd-adapter.md @@ -1,7 +1,7 @@ --- layout: card title: "NGFF M.2 M Key SSD to PCIe 1x Adapter" -picture: "m2-ngff-m-key-ssd.jpg" +picture: "/images/m2-ngff-m-key-ssd.jpg" functionality: "Full" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/TODO" diff --git a/_cards_m2/xiwai-ngff-m-key-m2-ssd-adapter.md b/_cards_m2/xiwai-ngff-m-key-m2-ssd-adapter.md index 861f6903d..0c56450ef 100644 --- a/_cards_m2/xiwai-ngff-m-key-m2-ssd-adapter.md +++ b/_cards_m2/xiwai-ngff-m-key-m2-ssd-adapter.md @@ -1,7 +1,7 @@ --- layout: card title: "Xiwai NGFF M Key M.2 SSD to PCIe 1x Adapter" -picture: "m2-xiwai-ngff-m-key-ssd.jpg" +picture: "/images/m2-xiwai-ngff-m-key-ssd.jpg" functionality: "Full" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/TODO" diff --git a/_cards_network/asus-pce-ac51-wifi-5.md b/_cards_network/asus-pce-ac51-wifi-5.md index de8c8b7a2..0901eaef6 100644 --- a/_cards_network/asus-pce-ac51-wifi-5.md +++ b/_cards_network/asus-pce-ac51-wifi-5.md @@ -1,7 +1,7 @@ --- layout: card title: "ASUS PCE-AC51 802.11ac WiFi Adapter" -picture: "network-asus-pce-ac51.jpg" +picture: "/images/network-asus-pce-ac51.jpg" functionality: "Currently Testing" driver_required: "Maybe" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/20" diff --git a/_cards_network/asus-xg-c100c-10g.md b/_cards_network/asus-xg-c100c-10g.md index b95978d2c..942dc60a5 100644 --- a/_cards_network/asus-xg-c100c-10g.md +++ b/_cards_network/asus-xg-c100c-10g.md @@ -1,7 +1,7 @@ --- layout: card title: "ASUS XG-C100C 10G Network Adapter" -picture: "network-asus-xg-c100c.jpg" +picture: "/images/network-asus-xg-c100c.jpg" functionality: "Currently Testing" driver_required: "Maybe" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/15" diff --git a/_cards_network/edup-intel-ax200-wifi-6.md b/_cards_network/edup-intel-ax200-wifi-6.md index 2322ee7ff..6e88c38cf 100644 --- a/_cards_network/edup-intel-ax200-wifi-6.md +++ b/_cards_network/edup-intel-ax200-wifi-6.md @@ -1,7 +1,7 @@ --- layout: card title: "EDUP PCIe Intel AX200 WiFi 6 Adapter" -picture: "network-edup-intel-ax200.jpg" +picture: "/images/network-edup-intel-ax200.jpg" functionality: "Full" driver_required: "Yes" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/22" diff --git a/_cards_network/intel-i340-t4-4-port-1g.md b/_cards_network/intel-i340-t4-4-port-1g.md index 5a57dcf87..fb2f959a7 100644 --- a/_cards_network/intel-i340-t4-4-port-1g.md +++ b/_cards_network/intel-i340-t4-4-port-1g.md @@ -1,7 +1,7 @@ --- layout: card title: "Intel I340-T4 PCIe x4 4-port Gigabit Network Adapter" -picture: "network-intel-i340-t4.jpg" +picture: "/images/network-intel-i340-t4.jpg" functionality: "Full" driver_required: "Yes" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/3" diff --git a/_cards_network/mellanox-connectx-2-mnpa19-xtr-sfp-10g.md b/_cards_network/mellanox-connectx-2-mnpa19-xtr-sfp-10g.md index 65a2aebd4..bb3564bc1 100644 --- a/_cards_network/mellanox-connectx-2-mnpa19-xtr-sfp-10g.md +++ b/_cards_network/mellanox-connectx-2-mnpa19-xtr-sfp-10g.md @@ -1,7 +1,7 @@ --- layout: card title: "Mellanox ConnectX-2 MNPA19-XTR SFP+ 10G Ethernet Adapter" -picture: "network-mellanox-connectx-2-mnpa19-xtr.jpg" +picture: "/images/network-mellanox-connectx-2-mnpa19-xtr.jpg" functionality: "Currently Testing" driver_required: "Maybe" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/21" diff --git a/_cards_network/rosewill-rc20001-25gbe.md b/_cards_network/rosewill-rc20001-25gbe.md index 919f61ed5..e90f1fdf7 100644 --- a/_cards_network/rosewill-rc20001-25gbe.md +++ b/_cards_network/rosewill-rc20001-25gbe.md @@ -1,7 +1,7 @@ --- layout: card title: "Rosewill RC-20001 2.5GBASE-T PCIe x1 Network Adapter" -picture: "network-rosewill-rc20001.jpg" +picture: "/images/network-rosewill-rc20001.jpg" functionality: "Currently Testing" driver_required: "Yes" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/40" diff --git a/_cards_storage/asm1061-2-port-adapter.md b/_cards_storage/asm1061-2-port-adapter.md index 35b69e3ae..8c629bd38 100644 --- a/_cards_storage/asm1061-2-port-adapter.md +++ b/_cards_storage/asm1061-2-port-adapter.md @@ -1,7 +1,7 @@ --- layout: card title: "4-port (2-active) ASM1061 SATA adapter" -picture: "storage-asm1061-2-port-adapter.jpg" +picture: "/images/storage-asm1061-2-port-adapter.jpg" functionality: "Currently Testing" driver_required: "Maybe" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/30" diff --git a/_cards_storage/ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.md b/_cards_storage/ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.md index 0e1aca841..509f45fcb 100644 --- a/_cards_storage/ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.md +++ b/_cards_storage/ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.md @@ -1,7 +1,7 @@ --- layout: card title: "IBM ServeRAID BR10i / LSI SAS3082E-R SAS RAID controller" -picture: "storage-ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.jpg" +picture: "/images/storage-ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.jpg" functionality: "Currently Testing" driver_required: "Maybe" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/18" diff --git a/_cards_storage/iocrest-sata-3-marvell-9215.md b/_cards_storage/iocrest-sata-3-marvell-9215.md index b569707bd..df88dee53 100644 --- a/_cards_storage/iocrest-sata-3-marvell-9215.md +++ b/_cards_storage/iocrest-sata-3-marvell-9215.md @@ -1,7 +1,7 @@ --- layout: card title: "IO Crest 4 Port SATA III PCIe x1 with Marvell 9215" -picture: "storage-iocrest-sata-3-marvell-9215.jpg" +picture: "/images/storage-iocrest-sata-3-marvell-9215.jpg" functionality: "Full" driver_required: "Yes" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/1" diff --git a/_cards_storage/teratrend-2-port-sata-3-marvell-88se9130.md b/_cards_storage/teratrend-2-port-sata-3-marvell-88se9130.md index f2fa3fcd2..1d285e1d4 100644 --- a/_cards_storage/teratrend-2-port-sata-3-marvell-88se9130.md +++ b/_cards_storage/teratrend-2-port-sata-3-marvell-88se9130.md @@ -1,7 +1,7 @@ --- layout: card title: "Teratrend 2-port SATA-III Marvell 88SE9130" -picture: "storage-teratrend-2-port-sata-3-marvell-88se9130.jpg" +picture: "/images/storage-teratrend-2-port-sata-3-marvell-88se9130.jpg" functionality: "Currently Testing" driver_required: "Maybe" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/29" diff --git a/_cards_usb/a-adwits-vl805.md b/_cards_usb/a-adwits-vl805.md index 74adba269..c6444ba61 100644 --- a/_cards_usb/a-adwits-vl805.md +++ b/_cards_usb/a-adwits-vl805.md @@ -1,7 +1,7 @@ --- layout: card title: "A ADWITS PCIe 1x 'PCI Experss' USB 3.0 adapter with VL805" -picture: "usb-a-adwits-vl805.jpg" +picture: "/images/usb-a-adwits-vl805.jpg" functionality: "Limited" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/45" diff --git a/_cards_usb/inateck-pcie-usb3.md b/_cards_usb/inateck-pcie-usb3.md index d17df177d..e28c0497b 100644 --- a/_cards_usb/inateck-pcie-usb3.md +++ b/_cards_usb/inateck-pcie-usb3.md @@ -1,7 +1,7 @@ --- layout: card title: "Inateck PCIe x1 USB 3.0 adapter" -picture: "usb-inateck-pcie-usb3.jpg" +picture: "/images/usb-inateck-pcie-usb3.jpg" functionality: "Limited" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/45" diff --git a/_cards_usb/syba-sd-pex20199.md b/_cards_usb/syba-sd-pex20199.md index 1b6b2bdc4..28f7208a5 100644 --- a/_cards_usb/syba-sd-pex20199.md +++ b/_cards_usb/syba-sd-pex20199.md @@ -1,7 +1,7 @@ --- layout: card title: "Syba SD-PEX20199 PCIe x1 USB 3.1 & 3.0 adapter" -picture: "usb-syba-sd-pex20199.jpg" +picture: "/images/usb-syba-sd-pex20199.jpg" functionality: "Full" driver_required: "No" github_issue: "https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/45" diff --git a/_config.yml b/_config.yml index 96520ebcd..44b3b1132 100644 --- a/_config.yml +++ b/_config.yml @@ -3,6 +3,7 @@ theme: jekyll-theme-slate title: Raspberry Pi PCIe Devices url: https://pipci.jeffgeerling.com/ fathom_analytics: true + collections: cards_adapter: output: true diff --git a/_layouts/card.html b/_layouts/card.html index d90f80863..a8715574b 100644 --- a/_layouts/card.html +++ b/_layouts/card.html @@ -33,7 +33,7 @@
{% if page.picture %} - {{ page.title }} + {{ page.title }} {% else %}

There is no picture for this card yet.

{% endif %} diff --git a/_plugins/image_thumbnail.rb b/_plugins/image_thumbnail.rb new file mode 100644 index 000000000..15393f1be --- /dev/null +++ b/_plugins/image_thumbnail.rb @@ -0,0 +1,11 @@ +# image_thumbnail.rb + +module Jekyll + module ImageThumbnail + def image_thumbnail(input) + input.sub("/images/", "/images/thumbnail/") + end + end +end + +Liquid::Template.register_filter(Jekyll::ImageThumbnail) diff --git a/_plugins/post_thumbnail_generator.rb b/_plugins/post_thumbnail_generator.rb new file mode 100644 index 000000000..19dfc1891 --- /dev/null +++ b/_plugins/post_thumbnail_generator.rb @@ -0,0 +1,43 @@ +# post_thumbnail_generator.rb +require "smartcropper" + +module Jekyll + + class PostThumbnailImage < StaticFile + def initialize(site, base, dir, name) + @site = site + @base = base + @dir = dir + @dest_dir = File.join("images", "thumbnail") + @name = name + end + + def destination(dest) + File.join(dest, @dest_dir, @name) + end + + def write(dest) + dest_path = destination(dest) + + return false if File.exist?(dest_path) and !modified? + @@mtimes[path] = mtime + + FileUtils.mkdir_p(File.dirname(dest_path)) + SmartCropper.from_file(path).smart_crop_and_scale(200, 200).write(dest_path) + + true + end + end + + class PostThumbnailGenerator < Generator + def generate(site) + # TODO: cards_m2, cards_network, cards_storage, etc... + site.cards_gpu.each {|post| + if post.data.has_key?("picture") + site.static_files << PostThumbnailImage.new(site, site.source, "_images", File.basename(post.data["image"])) + end + } + end + end + +end diff --git a/card-template.md b/card-template.md index 79a815edf..64ff5f4f8 100644 --- a/card-template.md +++ b/card-template.md @@ -10,7 +10,7 @@ videos: [] --- Copy this template into the appropriate `_cards_[type]` directory, and replace all the values above with the proper information: - - `picture`: can have a path to a picture inside images/card-pictures, or `false` + - `picture`: can have a path to a picture like `/images/[type]-card.jpg`, or `false` - `functionality`: can be one of "Currently Testing", "Full", "Partial", or "None" - `driver_required`: can be one of "Yes", "Maybe", or "No" - `github_issue`: should link to the GitHub issue corresponding to this card. diff --git a/images/card-pictures/adapter-exacq-ti-xio3130-2-port-pcie-switch.jpg b/images/adapter-exacq-ti-xio3130-2-port-pcie-switch.jpg similarity index 100% rename from images/card-pictures/adapter-exacq-ti-xio3130-2-port-pcie-switch.jpg rename to images/adapter-exacq-ti-xio3130-2-port-pcie-switch.jpg diff --git a/images/card-pictures/adapter-hlt-1x-16x-extension-cable.jpg b/images/adapter-hlt-1x-16x-extension-cable.jpg similarity index 100% rename from images/card-pictures/adapter-hlt-1x-16x-extension-cable.jpg rename to images/adapter-hlt-1x-16x-extension-cable.jpg diff --git a/images/card-pictures/adpater-iocrest-si-pex60016-2-port-pcie-switch.jpg b/images/adpater-iocrest-si-pex60016-2-port-pcie-switch.jpg similarity index 100% rename from images/card-pictures/adpater-iocrest-si-pex60016-2-port-pcie-switch.jpg rename to images/adpater-iocrest-si-pex60016-2-port-pcie-switch.jpg diff --git a/images/card-pictures/adpater-pce164p-no3-ver-006-riser.jpg b/images/adpater-pce164p-no3-ver-006-riser.jpg similarity index 100% rename from images/card-pictures/adpater-pce164p-no3-ver-006-riser.jpg rename to images/adpater-pce164p-no3-ver-006-riser.jpg diff --git a/images/card-pictures/adpater-pce164p-no3-ver-888-riser.jpg b/images/adpater-pce164p-no3-ver-888-riser.jpg similarity index 100% rename from images/card-pictures/adpater-pce164p-no3-ver-888-riser.jpg rename to images/adpater-pce164p-no3-ver-888-riser.jpg diff --git a/images/card-pictures/adpater-pce164p-no6-ver-008s-riser.jpg b/images/adpater-pce164p-no6-ver-008s-riser.jpg similarity index 100% rename from images/card-pictures/adpater-pce164p-no6-ver-008s-riser.jpg rename to images/adpater-pce164p-no6-ver-008s-riser.jpg diff --git a/images/card-pictures/gpu-evga-geforce-gtx-750ti.jpg b/images/gpu-evga-geforce-gtx-750ti.jpg similarity index 100% rename from images/card-pictures/gpu-evga-geforce-gtx-750ti.jpg rename to images/gpu-evga-geforce-gtx-750ti.jpg diff --git a/images/card-pictures/gpu-sapphire-radeon-rx550.jpg b/images/gpu-sapphire-radeon-rx550.jpg similarity index 100% rename from images/card-pictures/gpu-sapphire-radeon-rx550.jpg rename to images/gpu-sapphire-radeon-rx550.jpg diff --git a/images/card-pictures/gpu-visiontek-radeon-5450.jpg b/images/gpu-visiontek-radeon-5450.jpg similarity index 100% rename from images/card-pictures/gpu-visiontek-radeon-5450.jpg rename to images/gpu-visiontek-radeon-5450.jpg diff --git a/images/card-pictures/gpu-zotac-geforce-gt710.jpg b/images/gpu-zotac-geforce-gt710.jpg similarity index 100% rename from images/card-pictures/gpu-zotac-geforce-gt710.jpg rename to images/gpu-zotac-geforce-gt710.jpg diff --git a/images/card-pictures/m2-mzhou-m-key-ssd.jpg b/images/m2-mzhou-m-key-ssd.jpg similarity index 100% rename from images/card-pictures/m2-mzhou-m-key-ssd.jpg rename to images/m2-mzhou-m-key-ssd.jpg diff --git a/images/card-pictures/m2-ngff-m-key-ssd.jpg b/images/m2-ngff-m-key-ssd.jpg similarity index 100% rename from images/card-pictures/m2-ngff-m-key-ssd.jpg rename to images/m2-ngff-m-key-ssd.jpg diff --git a/images/card-pictures/m2-xiwai-ngff-m-key-ssd.jpg b/images/m2-xiwai-ngff-m-key-ssd.jpg similarity index 100% rename from images/card-pictures/m2-xiwai-ngff-m-key-ssd.jpg rename to images/m2-xiwai-ngff-m-key-ssd.jpg diff --git a/images/card-pictures/network-asus-pce-ac51.jpg b/images/network-asus-pce-ac51.jpg similarity index 100% rename from images/card-pictures/network-asus-pce-ac51.jpg rename to images/network-asus-pce-ac51.jpg diff --git a/images/card-pictures/network-asus-xg-c100c.jpg b/images/network-asus-xg-c100c.jpg similarity index 100% rename from images/card-pictures/network-asus-xg-c100c.jpg rename to images/network-asus-xg-c100c.jpg diff --git a/images/card-pictures/network-edup-intel-ax200.jpg b/images/network-edup-intel-ax200.jpg similarity index 100% rename from images/card-pictures/network-edup-intel-ax200.jpg rename to images/network-edup-intel-ax200.jpg diff --git a/images/card-pictures/network-intel-i340-t4.jpg b/images/network-intel-i340-t4.jpg similarity index 100% rename from images/card-pictures/network-intel-i340-t4.jpg rename to images/network-intel-i340-t4.jpg diff --git a/images/card-pictures/network-mellanox-connectx-2-mnpa19-xtr.jpg b/images/network-mellanox-connectx-2-mnpa19-xtr.jpg similarity index 100% rename from images/card-pictures/network-mellanox-connectx-2-mnpa19-xtr.jpg rename to images/network-mellanox-connectx-2-mnpa19-xtr.jpg diff --git a/images/card-pictures/network-rosewill-rc20001.jpg b/images/network-rosewill-rc20001.jpg similarity index 100% rename from images/card-pictures/network-rosewill-rc20001.jpg rename to images/network-rosewill-rc20001.jpg diff --git a/images/card-pictures/storage-asm1061-2-port-adapter.jpg b/images/storage-asm1061-2-port-adapter.jpg similarity index 100% rename from images/card-pictures/storage-asm1061-2-port-adapter.jpg rename to images/storage-asm1061-2-port-adapter.jpg diff --git a/images/card-pictures/storage-ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.jpg b/images/storage-ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.jpg similarity index 100% rename from images/card-pictures/storage-ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.jpg rename to images/storage-ibm-servraid-br10i-lsi-sas3082e-r-sas-raid.jpg diff --git a/images/card-pictures/storage-iocrest-sata-3-marvell-9215.jpg b/images/storage-iocrest-sata-3-marvell-9215.jpg similarity index 100% rename from images/card-pictures/storage-iocrest-sata-3-marvell-9215.jpg rename to images/storage-iocrest-sata-3-marvell-9215.jpg diff --git a/images/card-pictures/storage-teratrend-2-port-sata-3-marvell-88se9130.jpg b/images/storage-teratrend-2-port-sata-3-marvell-88se9130.jpg similarity index 100% rename from images/card-pictures/storage-teratrend-2-port-sata-3-marvell-88se9130.jpg rename to images/storage-teratrend-2-port-sata-3-marvell-88se9130.jpg diff --git a/images/card-pictures/usb-a-adwits-vl805.jpg b/images/usb-a-adwits-vl805.jpg similarity index 100% rename from images/card-pictures/usb-a-adwits-vl805.jpg rename to images/usb-a-adwits-vl805.jpg diff --git a/images/card-pictures/usb-inateck-pcie-usb3.jpg b/images/usb-inateck-pcie-usb3.jpg similarity index 100% rename from images/card-pictures/usb-inateck-pcie-usb3.jpg rename to images/usb-inateck-pcie-usb3.jpg diff --git a/images/card-pictures/usb-syba-sd-pex20199.jpg b/images/usb-syba-sd-pex20199.jpg similarity index 100% rename from images/card-pictures/usb-syba-sd-pex20199.jpg rename to images/usb-syba-sd-pex20199.jpg diff --git a/index.md b/index.md index 33fc99df2..e4f924c14 100644 --- a/index.md +++ b/index.md @@ -32,7 +32,8 @@ Below is a listing of _all_ the PCIe devices I'm testing on the Pi CM4. I post v {% if card.picture %} - {{ card.title }} +

TESTING: {{ card.picture | image_thumbnail }}

+ {{ card.title }} {% endif %} {{ card.title }} @@ -61,7 +62,7 @@ Below is a listing of _all_ the PCIe devices I'm testing on the Pi CM4. I post v {% if card.picture %} - {{ card.title }} + {{ card.title }} {% endif %} {{ card.title }} @@ -90,7 +91,7 @@ Below is a listing of _all_ the PCIe devices I'm testing on the Pi CM4. I post v {% if card.picture %} - {{ card.title }} + {{ card.title }} {% endif %} {{ card.title }} @@ -119,7 +120,7 @@ Below is a listing of _all_ the PCIe devices I'm testing on the Pi CM4. I post v {% if card.picture %} - {{ card.title }} + {{ card.title }} {% endif %} {{ card.title }} @@ -148,7 +149,7 @@ Below is a listing of _all_ the PCIe devices I'm testing on the Pi CM4. I post v {% if card.picture %} - {{ card.title }} + {{ card.title }} {% endif %} {{ card.title }} @@ -177,7 +178,7 @@ Below is a listing of _all_ the PCIe devices I'm testing on the Pi CM4. I post v {% if card.picture %} - {{ card.title }} + {{ card.title }} {% endif %} {{ card.title }}