Repackaging functionality
This commit is contained in:
parent
b95429f875
commit
a28ca6ca51
@ -1,5 +1,34 @@
|
||||
Extension { #name : #LePage }
|
||||
|
||||
{ #category : #'*Markdeep' }
|
||||
LePage >> asMarkdeep [
|
||||
| bodyStream markdeep |
|
||||
bodyStream := '' writeStream.
|
||||
self preorderTraversal do: [:snippet |
|
||||
bodyStream nextPutAll: snippet asMarkdeep
|
||||
].
|
||||
markdeep := Markdeep new
|
||||
title: self title;
|
||||
body: bodyStream contents;
|
||||
navTop: self navTop.
|
||||
self metadata keysAndValuesDo: [:k :v |
|
||||
k = 'lang'
|
||||
ifTrue: [
|
||||
markdeep head
|
||||
add: '<meta lang="', v,'">';
|
||||
yourself.
|
||||
]
|
||||
ifFalse: [
|
||||
markdeep head
|
||||
add: '<meta name="', k, '" content="', v,'">';
|
||||
yourself.
|
||||
]
|
||||
].
|
||||
self metadata at: 'authors' ifPresent: [:author | markdeep metadata at: 'authors' put: author ].
|
||||
self metadata at: 'version' ifPresent: [:version | markdeep metadata at: 'version' put: version ].
|
||||
^ markdeep.
|
||||
]
|
||||
|
||||
{ #category : #'*Markdeep' }
|
||||
LePage >> asMarkdeepFile [
|
||||
| folder |
|
||||
|
Loading…
Reference in New Issue
Block a user