diff --git a/repository/Grafoscopio-Utils/LePage.extension.st b/repository/Grafoscopio-Utils/LePage.extension.st index 427c2a9..05eac80 100644 --- a/repository/Grafoscopio-Utils/LePage.extension.st +++ b/repository/Grafoscopio-Utils/LePage.extension.st @@ -2,15 +2,20 @@ Extension { #name : #LePage } { #category : #'*Grafoscopio-Utils-Core' } LePage >> asMarkdeep [ - | bodyStream | + | bodyStream markdeep | bodyStream := '' writeStream. self preorderTraversal do: [:snippet | bodyStream nextPutAll: snippet asMarkdeep ]. - ^ Markdeep new + markdeep := Markdeep new title: self title; - body: bodyStream contents - contents. + body: bodyStream contents. + self metadata keysAndValuesDo: [:k :v | + markdeep header + add: ''; + yourself. + ]. + ^ markdeep. ] { #category : #'*Grafoscopio-Utils-Core' } @@ -39,13 +44,20 @@ LePage >> markdeepTemporalFile [ { #category : #'*Grafoscopio-Utils-Core' } LePage >> metadata [ + + ^ self options at: 'metadata' ifAbsentPut: [ self metadataInit] +] + +{ #category : #'*Grafoscopio-Utils-Core' } +LePage >> metadataInit [ + ^ OrderedDictionary new - at: 'id' put: self uidString; - at: 'created' put: self createTime asString; - at: 'modified' put: self latestEditTime asString; - at: 'creator' put: self createEmail asString; - at: 'editor' put: self editEmail asString; - yourself. + at: 'id' put: self uidString; + at: 'created' put: self createTime asString; + at: 'modified' put: self latestEditTime asString; + at: 'creator' put: self createEmail asString; + at: 'modifier' put: self editEmail asString; + yourself ] { #category : #'*Grafoscopio-Utils-Core' }