File tree Expand file tree Collapse file tree 2 files changed +34
-20
lines changed Expand file tree Collapse file tree 2 files changed +34
-20
lines changed Original file line number Diff line number Diff line change 8
8
"toPort" : " 20094" ,
9
9
"rewrite" : false ,
10
10
"status" : 302
11
- }
11
+ },
12
+ {
13
+ "description" : " Force trailing slash" ,
14
+ "from" : " \\ /([a-zA-Z0-9%_-]*?[^/])$" ,
15
+ "to" : " /$1/" ,
16
+ "rewrite" : false ,
17
+ "status" : 301
18
+ },
12
19
]
13
20
}
Original file line number Diff line number Diff line change 1
1
{% extends "_layouts/base.html" %}
2
2
3
3
{% set query = deconst.request.query %}
4
- {% set r = query.q|search(query.page) %}
5
4
6
5
{% block body %}
7
- < h1 > {{ r.total }} results found</ h1 >
6
+ < form action ="get ">
7
+ < input type ="text " value ="{{ query.q }} " placeholder ="Search ">
8
+ < input type ="submit " value ="Go ">
9
+ </ form >
8
10
9
- {% for result in r.results %}
10
- < div class ="result ">
11
- < a href ="{{ result.url }} "> {{ result.title }}</ a >
12
- < p > {{ result.excerpt }}</ p >
13
- </ div >
14
- {% else %}
15
- < p class ="explanation ">
16
- No results found.
17
- </ p >
18
- {% endfor %}
11
+ {% if query.q %}
12
+ {% set r = query.q|search(query.page) %}
13
+ < h1 > {{ r.total }} results found</ h1 >
19
14
20
- {% if r.pages > 1 %}
21
- < div class ="pager ">
22
- {% for p in range(1, r.pages) %}
23
- < a href ="/search?q={{ query.q }}&page={{ p }} "> {{ p }}</ a >
24
- {%- if not loop.last %} | {% endif -%}
25
- {% endfor %}
26
- </ div >
15
+ {% for result in r.results %}
16
+ < div class ="result ">
17
+ < a href ="{{ result.url }} "> {{ result.title }}</ a >
18
+ < p > {{ result.excerpt }}</ p >
19
+ </ div >
20
+ {% else %}
21
+ < p class ="explanation ">
22
+ No results found.
23
+ </ p >
24
+ {% endfor %}
25
+
26
+ {% if r.pages > 1 %}
27
+ < div class ="pager ">
28
+ {% for p in range(1, r.pages) %}
29
+ < a href ="/search/?q={{ query.q }}&page={{ p }} "> {{ p }}</ a >
30
+ {%- if not loop.last %} | {% endif -%}
31
+ {% endfor %}
32
+ </ div >
33
+ {% endif %}
27
34
{% endif %}
28
35
{% endblock %}
You can’t perform that action at this time.
0 commit comments