File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,30 @@ Deno.test("posts/ 中文", async () => {
185
185
assertStringIncludes ( body , `<p>你好,世界!` ) ;
186
186
} ) ;
187
187
188
+ Deno . test ( "posts/ sixth" , async ( ) => {
189
+ const resp = await testHandler ( new Request ( "https://blog.deno.dev/sixth" ) ) ;
190
+ assert ( resp ) ;
191
+ assertEquals ( resp . status , 200 ) ;
192
+ assertEquals ( resp . headers . get ( "content-type" ) , "text/html; charset=utf-8" ) ;
193
+ const body = await resp . text ( ) ;
194
+ assertStringIncludes (
195
+ body ,
196
+ `<a class="text-bluegray-500 font-bold" href="/?tag=sample">#sample</a>` ,
197
+ ) ;
198
+ assertStringIncludes (
199
+ body ,
200
+ `<a class="text-bluegray-500 font-bold" href="/?tag=tags">#tags</a>` ,
201
+ ) ;
202
+ assertStringIncludes ( body , `<html lang="en-GB">` ) ;
203
+ assertStringIncludes (
204
+ body ,
205
+ `<link rel="canonical" href="https://blog.deno.dev/sixth" />` ,
206
+ ) ;
207
+ assertStringIncludes ( body , `Sixth post` ) ;
208
+ assertStringIncludes ( body , `<time dateTime="2023-08-17T00:00:00.000Z">` ) ;
209
+ assertStringIncludes ( body , `Tags make it easier for readers` ) ;
210
+ } ) ;
211
+
188
212
Deno . test ( "posts/ trailing slash redirects" , async ( ) => {
189
213
const resp = await testHandler ( new Request ( "https://blog.deno.dev/second/" ) ) ;
190
214
assert ( resp ) ;
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Sixth post
3
+ author : CUSTOM AUTHOR NAME
4
+ publish_date : 2023-08-17
5
+ snippet : Some snippet appears in main page.
6
+ abstract : This is the sixth post showcasing math rendering
7
+ summary : Sort summary
8
+ description : A description to this post
9
+ tags : ["sample", "tags"]
10
+ allow_iframes : false
11
+ disable_html_sanitization : false
12
+ render_math : true
13
+ ---
14
+
15
+ # Tags
16
+
17
+ - Tags make it easier for readers to find the desired article.
18
+
19
+ ``` markdown
20
+ ---
21
+ tags: ["deno", "tags"]
22
+ ---
23
+ ```
24
+
25
+ or
26
+
27
+ ``` markdown
28
+ ---
29
+ tags:
30
+ - deno
31
+ - tags
32
+ ---
33
+ ```
You can’t perform that action at this time.
0 commit comments