diff --git a/index.html b/index.html
index 37cefa6..54aa44e 100755
--- a/index.html
+++ b/index.html
@@ -234,7 +234,7 @@ $(() => {
Wiki.__wiki_data = localStorage['wiki-data'] ?
JSON.parse(localStorage['wiki-data'])
: data
- Wiki.__wiki_data.__proto__ = BaseData
+ Wiki.__wiki_data.__proto__ = data
Wiki.location = localStorage['wiki-location'] || Wiki.location
diff --git a/wiki.js b/wiki.js
index 9b9d2c5..ca76839 100755
--- a/wiki.js
+++ b/wiki.js
@@ -100,7 +100,11 @@ var BaseData = {
// }
var data = {
'Templates/EmptyPage': {
- text: 'This page is empty.
WikiHome',
+ text: 'Page [@include(./path)] is empty.' +'
'
+ +'Links to this page:' +'
'
+ +'@include(./links)' +'
'
+ +'---' +'
'
+ +'WikiHome',
},
}
data.__proto__ = BaseData
@@ -188,10 +192,13 @@ var Wiki = {
// NOTE: changing this will move the page to the new path and change
// .location acordingly...
// NOTE: same applies to path parts below...
- //
- // XXX use a template for the redirect page...
+ // NOTE: changing path will update all the links to the moving page.
+ // NOTE: if a link can't be updated without a conflit then it is left
+ // unchanged, and a redirect page will be created.
get path(){
return this.location },
+ // XXX should lik updating be part of this???
+ // XXX use a template for the redirect page...
set path(value){
value = this.resolveDotPath(value)
@@ -432,7 +439,9 @@ var Wiki = {
// NOTE: this may be null...
return p
- || (!no_default ? this.acquire('./'+this.__default_page__) : null)
+ || ((!no_default && title != this.__default_page__) ?
+ this.acquire('./'+this.__default_page__)
+ : null)
},