diff --git a/src/Microdown-Blog/MicBlogCreator.class.st b/src/Microdown-Blog/MicBlogCreator.class.st index 475b4562..0b565528 100644 --- a/src/Microdown-Blog/MicBlogCreator.class.st +++ b/src/Microdown-Blog/MicBlogCreator.class.st @@ -53,43 +53,33 @@ MicBlogCreator >> copySourceDirectoryInTarget [ { #category : 'rendering' } MicBlogCreator >> createAllHtmlFile [ - | allFile allFileParse sum summar listOfSingleSummarize | - dateList := MicMonthListCreator new - generateMicListBlockOfLinkDateTo: targetDirectory. + | allFile allFileParse sum listOfSingleSummarize | "Copy the source directory in the target directory" self copySourceDirectoryInTarget. - - "Download the CSS" - self downloadCSS. + self downloadCSS. + "Collect and parse all Markdown file of targetDirectory" allFile := self collectAllMarkDownFile: targetDirectory. allFileParse := allFile collect: [ :each | (Microdown parse: each asFileReference contents) fromFile: each ]. - + + "Create _monthListBlog" + self initializeMonthList: allFileParse. + "transform all markdown file into html file" allFileParse do: [ :each | self createHtmlFile: each toReplace: each fromFile ]. - + "create summarizer html file" sum := MicSummarizer new. sum targetDirectory: targetDirectory. + listOfSingleSummarize := allFileParse collect: [ :each | MicSingleSummarizer new summarize: each ]. - self createHtmlSummarize: (sum summarize: listOfSingleSummarize). - - "Create the directory with all month summarizer in html" - targetDirectory fileSystem createDirectory: - targetDirectory fullName , '/_monthBlog'. - - MicMonthListCreator new generateDateListSince2014 do: [ :each | - summar := sum group: listOfSingleSummarize byDate: each. - summar isNotEmpty - ifTrue: [ - summar := sum summarize: summar. - self createHtmlGroupFile: summar at: each ] - ifFalse: [ self createHtmlEmptyGroupFileAt: each ] ] + + self createHtmlSummarize: (sum summarize: listOfSingleSummarize) ] { #category : 'rendering' }