From 81177703bea30b24db650048b7a30275633560fe Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Thu, 20 Oct 2016 15:24:32 -0400 Subject: [PATCH] Stub out /on/npm/foo --- www/on/npm/%package/index.html.spt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 www/on/npm/%package/index.html.spt diff --git a/www/on/npm/%package/index.html.spt b/www/on/npm/%package/index.html.spt new file mode 100644 index 0000000000..f467571f1b --- /dev/null +++ b/www/on/npm/%package/index.html.spt @@ -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 %}