diff --git a/src/Microdown-Blog-Tests/MicDummyBlogDeployer.class.st b/src/Microdown-Blog-Tests/MicDummyBlogDeployer.class.st index 475b5c6d..e50ed7a7 100644 --- a/src/Microdown-Blog-Tests/MicDummyBlogDeployer.class.st +++ b/src/Microdown-Blog-Tests/MicDummyBlogDeployer.class.st @@ -38,7 +38,8 @@ MicDummyBlogDeployer >> go [ self deploy. MicBlogCreator createFrom: FileSystem workingDirectory / self sourceFolder - to: self outputDirectory. + to: self outputDirectory + withRoot: ''. self launchHTTPServer. 1 seconds wait. self launchBrowser diff --git a/src/Microdown-Blog-Tests/MicFileTestResources.class.st b/src/Microdown-Blog-Tests/MicFileTestResources.class.st index a92212f0..78a1804e 100644 --- a/src/Microdown-Blog-Tests/MicFileTestResources.class.st +++ b/src/Microdown-Blog-Tests/MicFileTestResources.class.st @@ -10,7 +10,7 @@ MicFileTestResources >> dumperInput1 [ | root | root := Microdown parse: - '# [A Cool Story](' , '' , '/anExample1.html' , '' , ')'. + '### [A Cool Story](' , '' , '/anExample1.html' , '' , ')'. root children add: (Microdown parse: '2019/01/09') children first. root children add: (Microdown parse: 'Pharo is cool but this is a superlong paragraph Simple powerful language: No constructors, no...') @@ -24,7 +24,8 @@ MicFileTestResources >> dumperInput1WithRootPath [ | root | root := Microdown parse: - '# [A Cool Story](' , '' , self genericNonEmptyRootPath, '/anExample1.html' , '' , ')'. + '### [A Cool Story](' , '' , self genericNonEmptyRootPath + , '/anExample1.html' , '' , ')'. root children add: (Microdown parse: '2019/01/09') children first. root children add: (Microdown parse: 'Pharo is cool but this is a superlong paragraph Simple powerful language: No constructors, no...') @@ -38,9 +39,8 @@ MicFileTestResources >> dumperInput2 [ | root | root := Microdown parse: - '# [Pharo is cool](' , '' , '/anExample2.html' , '' , ')'. - root children add: - (Microdown parse: '2019/01/22') children first. + '### [Pharo is cool](' , '' , '/anExample2.html' , '' , ')'. + root children add: (Microdown parse: '2019/01/22') children first. root children add: (Microdown parse: 'If you are either a beginner or an expert in object-oriented programming, this MOOC will...') children first. @@ -53,9 +53,9 @@ MicFileTestResources >> dumperInput2WithRootPath [ | root | root := Microdown parse: - '# [Pharo is cool](' , '' , self genericNonEmptyRootPath, '/anExample2.html' , '' , ')'. - root children add: - (Microdown parse: '2019/01/22') children first. + '### [Pharo is cool](' , '' , self genericNonEmptyRootPath + , '/anExample2.html' , '' , ')'. + root children add: (Microdown parse: '2019/01/22') children first. root children add: (Microdown parse: 'If you are either a beginner or an expert in object-oriented programming, this MOOC will...') children first. @@ -68,9 +68,8 @@ MicFileTestResources >> dumperInput3 [ | root | root := Microdown parse: - '# [Mooc Pharo](' , '' , '/anExample3.html' , '' , ')'. - root children add: - (Microdown parse: '2018/01/29') children first. + '### [Mooc Pharo](' , '' , '/anExample3.html' , '' , ')'. + root children add: (Microdown parse: '2018/01/29') children first. root children add: (Microdown parse: 'Welcome to the Pharo Mooc (a set of videos, exercises, challenges, and miniprojects).') children first. @@ -83,9 +82,9 @@ MicFileTestResources >> dumperInput3WithRootPath [ | root | root := Microdown parse: - '# [Mooc Pharo](' , '' , self genericNonEmptyRootPath, '/anExample3.html' , '' , ')'. - root children add: - (Microdown parse: '2018/01/29') children first. + '### [Mooc Pharo](' , '' , self genericNonEmptyRootPath + , '/anExample3.html' , '' , ')'. + root children add: (Microdown parse: '2018/01/29') children first. root children add: (Microdown parse: 'Welcome to the Pharo Mooc (a set of videos, exercises, challenges, and miniprojects).') children first. diff --git a/src/Microdown-Blog/MicBlogCreator.class.st b/src/Microdown-Blog/MicBlogCreator.class.st index 95544ee1..3afb5c1c 100644 --- a/src/Microdown-Blog/MicBlogCreator.class.st +++ b/src/Microdown-Blog/MicBlogCreator.class.st @@ -101,7 +101,7 @@ MicBlogCreator >> createAllHtmlFile [ listOfSingleSummary := allFileParse collect: [ :each | MicSingleSummarizer new targetDirectory: targetDirectory; - root: root; + root: root; summarize: each ]. self sortSingleSummarizedDocuments: listOfSingleSummary. self generateRecentpost: listOfSingleSummary. @@ -205,8 +205,8 @@ MicBlogCreator >> generateRecentpost: listOfMicSingleSummarized [ MicBlogCreator >> initialize [ super initialize. - self cssFrameworkName: 'Axist'. - sum := MicListSummarizer new. + self cssFrameworkName: 'ClasslessCSS'. + sum := MicListSummarizer new ] { #category : 'rendering' } @@ -232,20 +232,25 @@ MicBlogCreator >> initializeMonthList: singleSummarizedDocuments [ MicBlogCreator >> mustacheAssembly: htmlString [ | context | - context := Dictionary new - at: 'content' put: htmlString; - at: 'recentPost' put: (MicHTMLVisitor new visit: recentPost copy) first contents; - at: 'archive' put: (MicHTMLVisitor new visit: dateList copy) first contents; - yourself. - - ^ (MustacheTemplate on: self mustacheTemplate) value: context + at: 'homeLink' put: self root , '/'; + at: 'content' put: htmlString; + at: 'recentPost' + put: + (MicHTMLVisitor new visit: recentPost copy) first + contents; + at: 'archive' + put: + (MicHTMLVisitor new visit: dateList copy) first contents; + yourself. + + ^ (MustacheTemplate on: self mustacheTemplate) value: context ] { #category : 'rendering' } MicBlogCreator >> mustacheTemplate [ - ^ '
Everything you wanted to know about http://www.pharo.org without being forced to read 1000 mails