Skip to content

Commit

Permalink
Fix distro url with special chars (#534)
Browse files Browse the repository at this point in the history
* Fix distro url with special chars

* Simplify expression
  • Loading branch information
razzeee authored May 10, 2022
1 parent a5307c4 commit 2591490
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# which_fake_page: "Rendering a fake page with a local variable" }

data.distro.each do |i|
proxy "/setup/#{i.name}.html", "/distro-template.html", :locals => { :name => i.name, :logo => i.logo, :info => i.info }, :ignore => true
proxy "/setup/#{i.slug ? i.slug : i.name}.html", "/distro-template.html", :locals => { :name => i.name, :logo => i.logo, :info => i.info, :slug => i.slug }, :ignore => true
end

# General configuration
Expand Down
3 changes: 2 additions & 1 deletion data/distro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@
</ol>
- name: "Pisi GNU/Linux"
slug: "Pisi GNU Linux"
logo: "pisi.svg"
logo_dark: "pisi-dark.svg"
info: >
Expand Down Expand Up @@ -733,7 +734,7 @@
<ol class="distrotut">
<h2>Enable Flatpak through the Software Manager</h2>
<p>Flatpak support is built in by default from KDE neon 19 and later. To activate the <a href="https://flathub.org/">Flathub</a> repository in Discover, just follow the instructions below:</p>
<p>Open Discover and click on Settings (lower left corner).</p2>
<p>Open Discover and click on Settings (lower left corner).</p2>
<p>Check that in the Flatpak section the box is checked.</p>
<p>Note: with this Flathub app search will be integrated in Discover, if you want to limit the app search to Flathub you can mark Flatpak as default by clicking on the star.</p>
</ol>
6 changes: 3 additions & 3 deletions source/setup.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ description: Quick Setup
%h1.centered Quick Setup
%p.centered
Select your distro to get set up.

.row
.distrogrid.col-lg-8.col-lg-offset-2
- data.distro.each do |i|
%a{:href => "/setup/#{i.name}"}
%a{:href => "/setup/#{i.slug ? i.slug : i.name}"}
%picture
%source{ :srcset => i.logo_dark ? "/img/distro/#{i.logo_dark}" : "/img/distro/#{i.logo}" , :media => "(prefers-color-scheme: dark)"}
%source{ :srcset => "/img/distro/#{i.logo_dark ? i.logo_dark : i.logo}" , :media => "(prefers-color-scheme: dark)"}
%img{ :src => "/img/distro/#{i.logo}", :alt => "#{i.name}", :title => "#{i.name}"}
1 change: 1 addition & 0 deletions toolbox-vscode
Submodule toolbox-vscode added at 54c39c

0 comments on commit 2591490

Please sign in to comment.