Creating a remote for the LePage document.

This commit is contained in:
ruidajo 2025-03-22 12:39:22 -05:00
parent cf021e29c0
commit 1871f82dd2
2 changed files with 16 additions and 2 deletions

View File

@ -189,12 +189,14 @@ LeDatabase >> gtViewErrorDetailsOn: aView withKey: erroKey [
{ #category : #'*MiniDocs' }
LeDatabase >> importDocumentFrom: aURL [
| doc |
| doc lePage |
"Using file extension in URL as a cheap (non-robuts) way of detecting the kind of document.
Better file type detection should be implemented in the future."
(aURL endsWith: '.md.html') ifTrue: [ ^ self addPageFromMarkdeepUrl: aURL ].
doc := HedgeDoc fromLink: aURL asString.
^ self addPage: doc asLePage
lePage := doc asLePage.
lePage remote: aURL asString.
^ self addPage: lePage
]
{ #category : #'*MiniDocs' }

View File

@ -264,6 +264,18 @@ LePage >> preorderTraversal [
^ self allChildrenDepthFirst
]
{ #category : #'*MiniDocs' }
LePage >> remote [
"the remote url of the document, used to refresh or sync"
^ self options at: 'remote'
]
{ #category : #'*MiniDocs' }
LePage >> remote: aUrl [
"setting a url for the remote document"
self options at: 'remote' put: aUrl
]
{ #category : #'*MiniDocs' }
LePage >> removeSnippetsMetadata [
self preorderTraversal do: [ :snippet |