Creating a remote for the LePage document.
This commit is contained in:
parent
cf021e29c0
commit
1871f82dd2
src/MiniDocs
@ -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' }
|
||||
|
@ -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 |
|
||||
|
Loading…
Reference in New Issue
Block a user