Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/nikola
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d33c568b785e
Choose a base ref
...
head repository: getnikola/nikola
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5e67fbd65298
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on May 7, 2015

  1. fixx template bug

    ralsina committed May 7, 2015
    Copy the full SHA
    bfab0d0 View commit details

Commits on May 8, 2015

  1. don't scrape

    ralsina committed May 8, 2015
    Copy the full SHA
    5e67fbd View commit details
2 changes: 1 addition & 1 deletion nikola/cdnjsdata.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ lang="{{ lang }}">
<script src="{{ cdn_url('jquery.colorbox', use_cdn, '/assets/js/jquery.colorbox-min.js') }}"></script>
{% endif %}
{% if colorbox_locales[lang] %}
<script src="{{ cdn_url('jquery.colorbox::i18n/jquery.colorbox-'+colorbox_locales[lang]+'.js', use_cdn, '/assets/js/colorbox-i18n/jquery.colorbox-'+colorbox_locales[lang] }}+'.js')}"></script>
<script src="{{ cdn_url('jquery.colorbox::i18n/jquery.colorbox-'+colorbox_locales[lang]+'.js', use_cdn, '/assets/js/colorbox-i18n/jquery.colorbox-'+colorbox_locales[lang] +'.js') }}"></script>
{% endif %}
{{ social_buttons_code }}
{% endmacro %}
2 changes: 1 addition & 1 deletion nikola/data/themes/bootstrap3/templates/base_helper.tmpl
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ lang="${lang}">
<script src="${cdn_url('jquery.colorbox', use_cdn, '/assets/js/jquery.colorbox-min.js')}"></script>
%endif
%if colorbox_locales[lang]:
<script src="${cdn_url('jquery.colorbox::i18n/jquery.colorbox-'+colorbox_locales[lang]+'.js', use_cdn, '/assets/js/colorbox-i18n/jquery.colorbox-'+colorbox_locales[lang]}+'.js')}"></script>
<script src="${cdn_url('jquery.colorbox::i18n/jquery.colorbox-'+colorbox_locales[lang]+'.js', use_cdn, '/assets/js/colorbox-i18n/jquery.colorbox-'+colorbox_locales[lang] +'.js')}"></script>
%endif
${social_buttons_code}
</%def>
25 changes: 15 additions & 10 deletions scripts/get-cdnjs-list.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
#!/usr/bin/env python

import json
import subprocess

links = {}
data = subprocess.check_output(['links', '-dump', 'https://cdnjs.com/'])
for l in data.splitlines():
l = l.strip()
if not 'https' in l:
from natsort import versorted
import requests

packages = requests.get('http://cdnjs.com/packages.json').json()['packages']

data = {}

for p in packages:
try:
name = p['name']
version = versorted([v['version'] for v in p['assets']])[-1]
data[name] = version
except:
print "can't parse: ", name
continue
name, url = [x.strip() for x in l.split('https:')]
links[name] = url

json.dump(links,open('cdnjsdata.json', 'w'))

json.dump(data, open('cdnjsdata.json', 'wb'))