Fixing improper name for metadata storage (head instead of header).

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-01-30 20:09:17 -05:00
parent abbafcf4e5
commit 7f1e2b24e2
2 changed files with 30 additions and 15 deletions

View File

@ -11,7 +11,7 @@ LePage >> asMarkdeep [
title: self title; title: self title;
body: bodyStream contents. body: bodyStream contents.
self metadata keysAndValuesDo: [:k :v | self metadata keysAndValuesDo: [:k :v |
markdeep header markdeep head
add: '<meta name="', k, '" content="', v,'">'; add: '<meta name="', k, '" content="', v,'">';
yourself. yourself.
]. ].
@ -38,6 +38,11 @@ LePage >> fileName [
^ self title asDashedLowercase, '.', ((self uidString copyFrom: 1 to: 5 ) copyWithoutAll: '/'), '.md.html' ^ self title asDashedLowercase, '.', ((self uidString copyFrom: 1 to: 5 ) copyWithoutAll: '/'), '.md.html'
] ]
{ #category : #'*Grafoscopio-Utils-Core' }
LePage >> fromMarkdeepUrl: aString [
^ aString asUrl retrieveContents.
]
{ #category : #'*Grafoscopio-Utils-Core' } { #category : #'*Grafoscopio-Utils-Core' }
LePage >> markdeepFileName [ LePage >> markdeepFileName [
| sanitized | | sanitized |

View File

@ -9,11 +9,11 @@ Class {
'body', 'body',
'tocStyle', 'tocStyle',
'comments', 'comments',
'header',
'tail', 'tail',
'language', 'language',
'config', 'config',
'metadata' 'metadata',
'head'
], ],
#category : #'Grafoscopio-Utils-Core' #category : #'Grafoscopio-Utils-Core'
} }
@ -95,7 +95,7 @@ Markdeep >> contents [
| output | | output |
output := '' writeStream. output := '' writeStream.
output output
nextPutAll: self headerContents; lf; lf; nextPutAll: self headContents; lf; lf;
nextPutAll: ' **', self title, '**'; lf; nextPutAll: ' **', self title, '**'; lf;
nextPutAll: ' ', self authors ; lf; nextPutAll: ' ', self authors ; lf;
nextPutAll: ' ', self version; lf; lf; nextPutAll: ' ', self version; lf; lf;
@ -146,23 +146,33 @@ Markdeep >> gtTextFor: aView [
] ]
{ #category : #accessing } { #category : #accessing }
Markdeep >> header [ Markdeep >> head [
^ header ifNil: [header := OrderedCollection new. ^ head ifNil: [ head := OrderedCollection new.
header add: self fontAwesomeHeader; yourself ] head add: self fontAwesomeHeader; yourself ]
] ]
{ #category : #accessing } { #category : #accessing }
Markdeep >> header: anOrderedCollection [ Markdeep >> head: anOrderedCollection [
header := anOrderedCollection head := anOrderedCollection
] ]
{ #category : #'instance creation' } { #category : #'instance creation' }
Markdeep >> headerContents [ Markdeep >> headContents [
| output |
output := '' writeStream. ^ String streamContents: [ :stream |
self header do: [:line | stream
output nextPutAll: line; lf ]. nextPutAll: '<head>';
^ output contents. nextPut: Character lf.
self head do: [ :line |
stream
nextPutAll: ' ';
nextPutAll: line;
nextPut: Character lf
].
stream
nextPutAll: '</head>';
nextPut: Character lf.
].
] ]
{ #category : #accessing } { #category : #accessing }