Using templates for wiki creation.
This commit is contained in:
parent
005e128ce0
commit
0f6bcbe6b2
@ -440,6 +440,13 @@ TiddlyWiki >> getRemoteTiddlers [
|
|||||||
^ self recentCommonTiddlersChanged
|
^ self recentCommonTiddlersChanged
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
TiddlyWiki >> hasTemplateInTiddlyHost [
|
||||||
|
|
||||||
|
self template ifNil: [ ^ false ].
|
||||||
|
^ self template asZnUrl host endsWith: 'tiddlyhost.com'
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TiddlyWiki >> htmlFileExists [
|
TiddlyWiki >> htmlFileExists [
|
||||||
self file ifNil: [
|
self file ifNil: [
|
||||||
@ -802,11 +809,29 @@ TiddlyWiki >> taggedWith: aTag [
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
TiddlyWiki >> template [
|
||||||
|
^ template
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TiddlyWiki >> template: anUrl [
|
TiddlyWiki >> template: anUrl [
|
||||||
template := anUrl
|
template := anUrl
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
TiddlyWiki >> templateTiddlersContentsString [
|
||||||
|
self hasTemplateInTiddlyHost ifFalse: [ ^ self ].
|
||||||
|
^ (self template asString, '/tiddlers.json') asZnUrl retrieveContents.
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
TiddlyWiki >> templateWiki [
|
||||||
|
^ (TiddlyWiki new fromString: self templateTiddlersContentsString)
|
||||||
|
name: 'Template Wiki';
|
||||||
|
remote: self template
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TiddlyWiki >> tiddlers [
|
TiddlyWiki >> tiddlers [
|
||||||
tiddlers ifNotNil: [ ^ tiddlers ].
|
tiddlers ifNotNil: [ ^ tiddlers ].
|
||||||
|
Loading…
Reference in New Issue
Block a user