Fixing web preview for documents via PharoChrome.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-01-26 09:34:36 -05:00
parent c8ce8d0068
commit 429e04bef7
2 changed files with 10 additions and 2 deletions

View File

@ -93,7 +93,7 @@ LePage >> detectParentSnippetWithUid: uidString [
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
LePage >> exportedFileName [ LePage >> exportedFileName [
| sanitized | | sanitized |
sanitized := self title asDashedLowercase copyWithoutAll: #($/ $:). sanitized := self title asDashedLowercase romanizeAccents copyWithoutAll: #($/ $:).
^ sanitized , '--' , (self uidString copyFrom: 1 to: 5) ^ sanitized , '--' , (self uidString copyFrom: 1 to: 5)
] ]

View File

@ -16,6 +16,14 @@ MiniDocsServer class >> build [
self start self start
] ]
{ #category : #accessing }
MiniDocsServer class >> defaultConfiguration [
"Override to set more default values"
^ {
#port -> 1701
}
]
{ #category : #accessing } { #category : #accessing }
MiniDocsServer class >> listLepiterDocs: aRequest [ MiniDocsServer class >> listLepiterDocs: aRequest [
<REST_API: 'GET' pattern: 'lepiter'> <REST_API: 'GET' pattern: 'lepiter'>
@ -41,7 +49,6 @@ MiniDocsServer >> addStorage: anObject [
{ #category : #accessing } { #category : #accessing }
MiniDocsServer >> initRoutes [ MiniDocsServer >> initRoutes [
super initTeapot.
self storage: FileLocator documents / 'lepiter' / 'default'. self storage: FileLocator documents / 'lepiter' / 'default'.
self teapot self teapot
serveStatic: '/lepiter/doc' from: self storage fullName. serveStatic: '/lepiter/doc' from: self storage fullName.
@ -51,6 +58,7 @@ MiniDocsServer >> initRoutes [
{ #category : #accessing } { #category : #accessing }
MiniDocsServer >> start [ MiniDocsServer >> start [
self class defaultPort: 1701.
self initRoutes. self initRoutes.
super start. super start.
] ]