File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 8
8
9
9
env :
10
10
PNPM_VERSION : 10.4.1
11
+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
12
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
11
13
12
14
jobs :
13
15
build :
Original file line number Diff line number Diff line change @@ -32,4 +32,5 @@ next-env.d.ts
32
32
33
33
# remote blog content
34
34
/content /blogs /*
35
- /public /blog /*
35
+ /public /blog /*
36
+ /content /tmp /*
Original file line number Diff line number Diff line change @@ -24,6 +24,17 @@ async function generate() {
24
24
. filter ( page => ! page . includes ( '/_' ) )
25
25
) ;
26
26
27
+ // Get blog pages from the build output
28
+ const blogPages = await globby ( [ 'out/blog/**/*.html' ] )
29
+ . then ( pages => pages
30
+ . map ( page => page
31
+ . replace ( 'out' , '' )
32
+ . replace ( '/index.html' , '' )
33
+ . replace ( '.html' , '' )
34
+ )
35
+ . filter ( page => ! page . includes ( '/_' ) && ! page . includes ( '/blog/index' ) )
36
+ ) ;
37
+
27
38
const baseUrl = 'https://refref.ai' ;
28
39
29
40
const sitemap = `
@@ -72,6 +83,24 @@ async function generate() {
72
83
<priority>0.7</priority>
73
84
</url>
74
85
` ) ,
86
+ // Add blog index page
87
+ `
88
+ <url>
89
+ <loc>${ baseUrl } /blog</loc>
90
+ <lastmod>${ new Date ( ) . toISOString ( ) } </lastmod>
91
+ <changefreq>weekly</changefreq>
92
+ <priority>0.8</priority>
93
+ </url>
94
+ ` ,
95
+ // Add blog pages
96
+ ...blogPages . map ( ( path ) => `
97
+ <url>
98
+ <loc>${ baseUrl } ${ path } </loc>
99
+ <lastmod>${ new Date ( ) . toISOString ( ) } </lastmod>
100
+ <changefreq>weekly</changefreq>
101
+ <priority>0.7</priority>
102
+ </url>
103
+ ` ) ,
75
104
]
76
105
. filter ( Boolean )
77
106
. join ( '' ) }
You can’t perform that action at this time.
0 commit comments