File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
= head1 Upcoming
4
4
5
+ = head1 0.2.3
6
+
7
+ = item fix rss.xml file generation
8
+
5
9
= head1 0.2.2
6
10
7
11
= item average page size optimization (reduction up to 2-3 times)
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " podlite-web" ,
3
3
"description" : " 📖 Create static websites with Next.js and the Podlite markup language." ,
4
- "version" : " 0.2.2 " ,
4
+ "version" : " 0.2.3 " ,
5
5
"private" : true ,
6
6
"scripts" : {
7
7
"next_dev" : " next dev" ,
Original file line number Diff line number Diff line change 1
1
import { DataFeedContent } from '../../bin/makeDataSource'
2
- import { DATA_PATH , PUBLIC_PATH } from '../constants'
2
+ import { PUBLIC_PATH } from '../constants'
3
3
import { getSiteInfo } from '../utils'
4
4
import * as fs from 'fs'
5
5
import { convertPodNodeToHtml as convertPodNodeToHtml } from '../utils'
6
- import { getData } from 'src/serverside'
6
+ import { getAllPages } from 'src/serverside'
7
7
8
8
export function getRssForData ( data : DataFeedContent ) {
9
9
const conf = data . siteInfo
@@ -35,8 +35,7 @@ ${pages
35
35
`
36
36
}
37
37
export function writeRss ( ) {
38
- const dataFeed = getData ( )
39
- const pages = dataFeed . all
38
+ const pages = getAllPages ( )
40
39
. filter ( a => a . pubdate )
41
40
. filter ( page => page . description )
42
41
. sort ( ( a , b ) => {
@@ -46,6 +45,6 @@ export function writeRss() {
46
45
. reverse ( )
47
46
. splice ( 0 , 10 )
48
47
//@ts -ignore
49
- const rss = getRssForData ( { ... dataFeed , all : pages , siteInfo : getSiteInfo ( ) } )
48
+ const rss = getRssForData ( { all : pages , siteInfo : getSiteInfo ( ) } )
50
49
fs . writeFileSync ( `${ PUBLIC_PATH } /rss.xml` , rss )
51
50
}
You can’t perform that action at this time.
0 commit comments