Repackaging functionality

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-16 14:21:51 -05:00
parent b96ef356c5
commit 4487348041

View File

@ -1,26 +1,5 @@
Extension { #name : #LePage }
{ #category : #'*Grafoscopio-Utils-Core' }
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 |
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 : #'*Grafoscopio-Utils-Core' }
LePage >> asMarkdeepInto: aFileLocator [