Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Stub out /on/npm/foo
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Oct 20, 2016
1 parent d70ba0f commit 8117770
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions www/on/npm/%package/index.html.spt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import requests

from aspen import Response
from gratipay.utils import markdown
[---]
package_name = request.path['package']
r = requests.get('https://registry.npmjs.com/{}'.format(package_name))
if r.status_code != 200:
raise Response(r.status_code)
readme = markdown.render(r.json()['readme'])
title = package_name
suppress_sidebar = True
[---]
{% extends "templates/base.html" %}
{% block content %}

{{ readme }}

No it's not.

{% endblock %}

0 comments on commit 8117770

Please sign in to comment.