Adding LePage metadata.
This commit is contained in:
parent
c281f782a1
commit
ed6d66fb2a
@ -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: '<meta name="', k, '" content="', v,'">';
|
||||
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: 'modifier' put: self editEmail asString;
|
||||
yourself
|
||||
]
|
||||
|
||||
{ #category : #'*Grafoscopio-Utils-Core' }
|
||||
|
Loading…
Reference in New Issue
Block a user