-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
dogsheep-beta.yml
229 lines (227 loc) · 7.23 KB
/
dogsheep-beta.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
blog.db:
entries:
sql: |-
select
id as key,
title,
body as search_1,
published as timestamp,
1 as is_public
from
entries
display_sql: |-
select
url,
highlight(
body, :q
) as snippet
from
entries
where
entries.id = :key
display: |-
<h3>Blog: <a href="{{ display.url }}">{{ title }}</a></h3>
<p>{{ display.snippet|safe }}</p>
<p><small>Published {{ timestamp }}</small></p>
tils.db:
til:
sql: |-
select
path as key,
title,
body as search_1,
created_utc as timestamp,
1 as is_public
from
til
where
"title" like '%datasette%'
or topic in ('datasette', 'sqlite')
order by
created_utc desc
display_sql: |-
select
topic,
slug,
highlight(
body, :q
) as snippet
from
til
where
til.path = :key
display: |-
<h3>TIL: <a href="https://til.simonwillison.net/{{ display.topic }}/{{ display.slug }}">{{ title }}</a></h3>
<p>{{ display.snippet|safe }}</p>
<p><small>Published {{ timestamp }}</small></p>
docs-index.db:
sections:
sql: |-
select
id as key,
title as title,
content as search_1,
null as timestamp,
1 as is_public
from
sections
display_sql: |-
select
page,
ref,
snippet(
sections_fts,
-1,
'b4de2a49c8',
'8c94a2ed4b',
'...',
60
) as snippet
from
sections
join sections_fts on sections.rowid = sections_fts.rowid
where
id = :key
and sections_fts match escape_fts(case when :q = '' then sections.title else :q end)
display: |-
<h3>Docs: <a href="https://docs.datasette.io/en/stable/{{ display.page }}.html#{{ display.ref }}">{{ title }}</a></h3>
<p>{{ display.snippet.replace('b4de2a49c8', '<strong style="background-color: yellow">').replace('8c94a2ed4b', '</strong>')|safe }}</p>
content.db:
uses:
sql: |-
select
_path as key,
title as title,
text as search_1,
null as timestamp,
1 as is_public
from
uses
display_sql: |-
select
highlight(uses.text, :q) as snippet
from
uses
where
uses._path = :key
display: |-
<h3><a href="/{{ key.replace(".md", "") }}">{{ title }}</a></h3>
<p>{{ display.snippet|safe }}</p>
tools:
sql: |-
select
tools.name as key,
tools.name as title,
tools.created_at as timestamp,
tools.description || ' ' || coalesce(repos.readme, '') as search_1,
1 as is_public
from tools join repos on tools.name = repos.name
display_sql: |-
select
highlight(
tools.description || ' ' || coalesce(repos.readme_html, ''), :q
) as snippet,
usesCustomOpenGraphImage,
openGraphImageUrl
from
tools join repos on tools.name = repos.name
where
tools.name = :key
display: |-
<h3>Tool: <a href="/tools/{{ title }}">{{ title }}</a></h3>
<p>{{ display.snippet|safe }}</p>
{% if display.usesCustomOpenGraphImage %}
<p><img src="{{ display.openGraphImageUrl }}" alt="" style="max-width: 100%"></p>
{% endif %}
<p><small>Created {{ timestamp }}</small></p>
plugins:
sql: |-
select
plugins.name as key,
plugins.name as title,
plugins.created_at as timestamp,
plugins.description || ' ' || coalesce(repos.readme, '') as search_1,
1 as is_public
from plugins join repos on plugins.name = repos.name
display_sql: |-
select
highlight(
plugins.description || ' ' || coalesce(repos.readme_html, ''), :q
) as snippet,
usesCustomOpenGraphImage,
openGraphImageUrl
from
plugins join repos on plugins.name = repos.name
where
plugins.name = :key
display: |-
<h3>Plugin: <a href="/plugins/{{ title }}">{{ title }}</a></h3>
<p>{{ display.snippet|safe }}</p>
{% if display.usesCustomOpenGraphImage %}
<p><img src="{{ display.openGraphImageUrl }}" alt="" style="max-width: 100%"></p>
{% endif %}
<p><small>Created {{ timestamp }}</small></p>
releases:
sql: |-
select
releases.id as key,
repos.name || ' ' || releases.tag_name as title,
releases.published_at as timestamp,
releases.body as search_1,
1 as is_public
from
releases
join repos on releases.repo = repos.id
display_sql: |-
select
highlight(render_markdown(releases.body), :q) as snippet,
html_url
from releases where id = :key
display: |-
<h3>Release: <a href="{{ display.html_url }}">{{ title }}</a></h3>
<p>{{ display.snippet|safe }}</p>
<p><small>Released {{ timestamp }}</small></p>
news:
sql: |-
select
date as key,
'Datasette News: ' || date as title,
date || 'T00:00:00-08:00' as timestamp,
group_concat(body, '
') as search_1,
1 as is_public
from
news
group by
date
order by
date desc
display_sql: |-
select
render_markdown(group_concat(body, '
')) as rendered_markdown
from news where date = :key
display: |-
<h3><a href="/news/{{ key }}">{{ title }}</a></h3>
<p>{{ display.rendered_markdown|safe }}</p>
tutorials:
sql: |-
select
path as key,
title,
body as search_1,
1 as is_public
from
tutorials
display_sql: |-
select
highlight(
body, :q
) as snippet
from
tutorials
where
tutorials.path = :key
display: |-
<h3>Tutorial: <a href="{{ key }}">{{ title }}</a></h3>
<p>{{ display.snippet|safe }}</p>