Skip to content

Commit

Permalink
Adds support for new Appstream tag for vcs
Browse files Browse the repository at this point in the history
  • Loading branch information
RMcNeely committed Apr 30, 2022
1 parent c07fa74 commit 9fbb802
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _layouts/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ <h2>What's New:</h2>
{% if page.help_page %}
<a class="button" href="{{ page.help_page }}" target="_blank">Help</a>
{% endif %}
{% if page.source_code %}
<a class="button" href="{{page.sourc_code}}" target="_blank">Source Code</a>
{% endif %}

This comment has been minimized.

Copy link
@waldyrious

waldyrious Apr 30, 2022

Not sure if I wasn't clear, or if you disagree with what I suggested, but what I proposed in elementary#84 was for the source code link to be placed where currently there is the "Publish on AppCenter" link, in the .call-to-action div (line 48 above), and that link would be moved to the footer here. What do you think?

This comment has been minimized.

Copy link
@RMcNeely

RMcNeely May 2, 2022

Author Owner

Looks like I misunderstood your intent slightly; let me file the PR and then lets move the conversation there.

This comment has been minimized.

Copy link
@waldyrious

waldyrious May 2, 2022

Sure! Just a small note: you seem to have a typo in line 82 :)

-page.sourc_code
+page.source_code
</div>
</footer>

Expand Down
8 changes: 8 additions & 0 deletions generate-flatpak.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
developer: "((dev))"
homepage: ((site))
help_page: ((help))
source_code: ((vcs))
bugtracker: ((bugtracker))
dist: flatpak
screenshots:
Expand Down Expand Up @@ -82,6 +83,13 @@
end
appFile.sub!('((help))', help)

vcs = "false"
vcs_url = component.at_css('url[type="vcs-browser]')
if not vcs_url.nil?
vcs = vcs_url.content
end
appFile.sub!('((vcs))', vcs)

bugtracker = "false"
url_bugtracker = component.at_css('url[type="bugtracker"]')
if not url_bugtracker.nil?
Expand Down

0 comments on commit 9fbb802

Please sign in to comment.