Adding LePage metadata.
This commit is contained in:
parent
c281f782a1
commit
ed6d66fb2a
@ -2,15 +2,20 @@ Extension { #name : #LePage }
|
|||||||
|
|
||||||
{ #category : #'*Grafoscopio-Utils-Core' }
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
||||||
LePage >> asMarkdeep [
|
LePage >> asMarkdeep [
|
||||||
| bodyStream |
|
| bodyStream markdeep |
|
||||||
bodyStream := '' writeStream.
|
bodyStream := '' writeStream.
|
||||||
self preorderTraversal do: [:snippet |
|
self preorderTraversal do: [:snippet |
|
||||||
bodyStream nextPutAll: snippet asMarkdeep
|
bodyStream nextPutAll: snippet asMarkdeep
|
||||||
].
|
].
|
||||||
^ Markdeep new
|
markdeep := Markdeep new
|
||||||
title: self title;
|
title: self title;
|
||||||
body: bodyStream contents
|
body: bodyStream contents.
|
||||||
contents.
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
|
markdeep header
|
||||||
|
add: '<meta name="', k, '" content="', v,'">';
|
||||||
|
yourself.
|
||||||
|
].
|
||||||
|
^ markdeep.
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*Grafoscopio-Utils-Core' }
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
||||||
@ -39,13 +44,20 @@ LePage >> markdeepTemporalFile [
|
|||||||
|
|
||||||
{ #category : #'*Grafoscopio-Utils-Core' }
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
||||||
LePage >> metadata [
|
LePage >> metadata [
|
||||||
|
|
||||||
|
^ self options at: 'metadata' ifAbsentPut: [ self metadataInit]
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
||||||
|
LePage >> metadataInit [
|
||||||
|
|
||||||
^ OrderedDictionary new
|
^ OrderedDictionary new
|
||||||
at: 'id' put: self uidString;
|
at: 'id' put: self uidString;
|
||||||
at: 'created' put: self createTime asString;
|
at: 'created' put: self createTime asString;
|
||||||
at: 'modified' put: self latestEditTime asString;
|
at: 'modified' put: self latestEditTime asString;
|
||||||
at: 'creator' put: self createEmail asString;
|
at: 'creator' put: self createEmail asString;
|
||||||
at: 'editor' put: self editEmail asString;
|
at: 'modifier' put: self editEmail asString;
|
||||||
yourself.
|
yourself
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*Grafoscopio-Utils-Core' }
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
||||||
|
Loading…
Reference in New Issue
Block a user