File tree Expand file tree Collapse file tree 2 files changed +29
-31
lines changed Expand file tree Collapse file tree 2 files changed +29
-31
lines changed Original file line number Diff line number Diff line change 121
121
122
122
if 'site' in package ['badges' ]:
123
123
if 'site' not in package :
124
- package ['site' ] = '{}.org' .format (package ['repo_name' ])
125
- package ['site_protocol' ] = 'https'
124
+ package ['site' ] = f'https://{ package ["repo_name" ]} .org'
126
125
else :
127
- package ['site_protocol' ], package [ ' site' ] = package ['site' ].rstrip ('/' ). split ( ':/ /' )
126
+ package ['site' ] = package ['site' ].rstrip ('/' )
128
127
129
- template = Template ((here / 'template.rst' ).read_text ())
128
+ template = Template ((here / 'template.rst' ).read_text (),
129
+ lstrip_blocks = True , trim_blocks = True )
130
130
131
131
config = sorted (config , key = lambda i : i ['name' ])
132
132
Original file line number Diff line number Diff line change 1
1
.. raw :: html
2
2
3
3
<div >
4
- <table id =" packages" >
5
- {% for section in config %}
6
- <tr >
7
- <th colspan =5 >
8
- {% with section_id = section.name | lower | replace(" ", "-") %}
9
- <h3 id =" {{ section_id }}" >
10
- {{ section.name }}
11
- <a class =" headerlink" href =" #{{ section_id }}" title =" Permalink to this headline" >#</a >
12
- </h3 >
13
- {% endwith %}
14
- </th >
15
- </tr >
4
+ <table id =" packages" >
5
+ {% for section in config %}
6
+ <tr >
7
+ <th colspan =5 >
8
+ {% with section_id = section.name | lower | replace(" ", "-") %}
9
+ <h3 id =" {{ section_id }}" >
10
+ {{ section.name }}
11
+ <a class =" headerlink" href =" #{{ section_id }}" title =" Permalink to this headline" >#</a >
12
+ </h3 >
13
+ {% endwith %}
14
+ </th >
15
+ </tr >
16
16
17
17
{% for package in section.packages %}
18
18
<tr >
19
-
20
19
<td >
21
20
<a href =" https://github.com/{{ package.repo }}" >
22
21
<img src =" _static/badges/github-gray.svg" >
36
35
<img src =" _static/badges/conda-blue.svg" >
37
36
</a >
38
37
{% endif %}
39
- </td >
38
+ </td >
40
39
41
- <td >
42
- {% if 'site' in package.badges %}
43
- <a href =" {{ package.site_protocol}}://{{ package.site }}" >{{ package.name }}</a >
44
- {% else %}
45
- <a href =" https://github.com/{{ package.repo }}" >{{ package.name }}</a >
46
- {% endif %}
47
- </td >
48
- <td >
49
- {{ package.description }}
50
- </td >
51
-
40
+ <td >
41
+ {% if 'site' in package.badges %}
42
+ <a href =" {{ package.site }}" >{{ package.name }}</a >
43
+ {% else %}
44
+ <a href =" https://github.com/{{ package.repo }}" >{{ package.name }}</a >
45
+ {% endif %}
46
+ </td >
47
+ <td >
48
+ {{ package.description }}
49
+ </td >
52
50
53
51
</tr >
54
52
{% endfor %}
55
- {% endfor %}
53
+ {% endfor %}
56
54
</table >
57
- </div >
55
+ </div >
You can’t perform that action at this time.
0 commit comments