Web preview for pages not located in the default Lepiter folder.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-06-20 12:15:31 -05:00
parent 968bfff3bb
commit 882f33859c

View File

@ -162,7 +162,10 @@ LePage >> latestEditTime: aLeTime [
LePage >> localHostAddress [
| localUrl route |
MiniDocsServer teapot server isRunning ifFalse: [ MiniDocsServer restart ].
route := MiniDocsServer teapot staticRouter prefix joinUsing: '/'.
route := self storage path segments joinUsing: '/'.
MiniDocsServer teapot
serveStatic: ('/', route, '/', self markdeepFileName)
from: self storage / self markdeepFileName.
localUrl := MiniDocsServer teapot server localUrl asString.
^ localUrl, route, '/', self markdeepFileName
]