{{ . }}
++ The hypha you are trying to access does not exist yet. Why not create it? +
+diff --git a/README.md b/README.md index 7a7d6d8..d96bdff 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # mycorrhiza wiki -Simple wiki engine inspired by fungi. +A wiki engine inspired by fungi. + +Current version: 0.5. + +Not production-ready. diff --git a/cfg/config.go b/cfg/config.go index f5e6251..0a40da1 100644 --- a/cfg/config.go +++ b/cfg/config.go @@ -8,17 +8,23 @@ import ( "path/filepath" ) +type MyceliumConfig struct { + Names []string `json:"names"` + Type string `json:"type"` +} + const ( HyphaPattern = `[^\s\d:/?&\\][^:?&\\]*` HyphaUrl = `/{hypha:` + HyphaPattern + `}` RevisionPattern = `[\d]+` RevQuery = `{rev:` + RevisionPattern + `}` + MyceliumPattern = `[^\s\d:/?&\\][^:?&\\/]*` + MyceliumUrl = `/:{mycelium:` + MyceliumPattern + `}` ) var ( DescribeHyphaHerePattern = "Describe %s here" WikiDir string - TemplatesDir string configJsonPath string // Default values that can be overriden in config.json @@ -28,22 +34,23 @@ var ( GenericErrorMsg = `Sorry, something went wrong` SiteTitle = `MycorrhizaWiki` Theme = `default-light` + Mycelia = []MyceliumConfig{ + {[]string{"main"}, "main"}, + {[]string{"sys", "system"}, "system"}, + } ) func InitConfig(wd string) bool { log.Println("WikiDir is", wd) WikiDir = wd - TemplatesDir = "Templates" - configJsonPath = filepath.Join(filepath.Dir(WikiDir), "config.json") + configJsonPath = filepath.Join(WikiDir, "config.json") if _, err := os.Stat(configJsonPath); os.IsNotExist(err) { log.Println("config.json not found, using default values") - } else { - log.Println("config.json found, overriding default values...") - return readConfig() + return false } - - return true + log.Println("config.json found, overriding default values...") + return readConfig() } func readConfig() bool { @@ -54,9 +61,10 @@ func readConfig() bool { } cfg := struct { - Address string `json:"address"` - Theme string `json:"theme"` - SiteTitle string `json:"site-title"` + Address string `json:"address"` + Theme string `json:"theme"` + SiteTitle string `json:"site-title"` + Mycelia []MyceliumConfig `json:"mycelia"` TitleTemplates struct { EditHypha string `json:"edit-hypha"` ViewHypha string `json:"view-hypha"` @@ -74,6 +82,7 @@ func readConfig() bool { SiteTitle = cfg.SiteTitle TitleEditTemplate = cfg.TitleTemplates.EditHypha TitleTemplate = cfg.TitleTemplates.ViewHypha + Mycelia = cfg.Mycelia return true } diff --git a/fs/data.go b/fs/data.go index 0eb142d..58b7264 100644 --- a/fs/data.go +++ b/fs/data.go @@ -10,14 +10,19 @@ import ( "strings" "github.com/bouncepaw/mycorrhiza/cfg" + "github.com/bouncepaw/mycorrhiza/util" ) func (h *Hypha) MetaJsonPath() string { return filepath.Join(h.Path(), "meta.json") } +func (h *Hypha) CanonicalName() string { + return util.UrlToCanonical(h.FullName) +} + func (h *Hypha) Path() string { - return filepath.Join(cfg.WikiDir, h.FullName) + return filepath.Join(cfg.WikiDir, h.CanonicalName()) } func (h *Hypha) TextPath() string { @@ -25,7 +30,7 @@ func (h *Hypha) TextPath() string { } func (h *Hypha) parentName() string { - return filepath.Dir(h.FullName) + return filepath.Dir(util.UrlToCanonical(h.FullName)) } // hasBinaryData returns true if the revision has any binary data associated. diff --git a/fs/fs.go b/fs/fs.go index b10dc74..3d1488a 100644 --- a/fs/fs.go +++ b/fs/fs.go @@ -54,6 +54,3 @@ func (s *Storage) indexHyphae(path string) { } } } - -func (h *Hypha) Close() { -} diff --git a/fs/genealogy.go b/fs/genealogy.go index 1bc3adb..5d63c37 100644 --- a/fs/genealogy.go +++ b/fs/genealogy.go @@ -6,6 +6,8 @@ import ( "path/filepath" "sort" "strings" + + "github.com/bouncepaw/mycorrhiza/util" ) func (s *Storage) RenderHypha(h *Hypha) { @@ -24,6 +26,7 @@ type Tree struct { // It can also generate trees for non-existent hyphae, that's why we use `name string` instead of making it a method on `Hypha`. // In `root` is `false`, siblings will not be fetched. func (s *Storage) GetTree(name string, root bool) *Tree { + name = util.UrlToCanonical(name) t := &Tree{Name: name, Root: root} for hyphaName, _ := range s.paths { s.compareNamesAndAppend(t, hyphaName) @@ -65,14 +68,14 @@ func (t *Tree) AsHtml() (html string) { html += `
Good types are text/markdown and text/plain
Please make your comment helpful
- - -Tags are separated by commas, whitespace is ignored
- - -If this hypha has a file like that, the text above is meant to be a description of it
- - -- - Cancel -
--The hypha you are trying to access does not exist yet. Why not create it? -
diff --git a/w/README.md b/wiki/README.md similarity index 100% rename from w/README.md rename to wiki/README.md diff --git a/wiki/config.json b/wiki/config.json new file mode 100644 index 0000000..2f2abee --- /dev/null +++ b/wiki/config.json @@ -0,0 +1,31 @@ +{ + "address": "127.0.0.1:1737", + "theme": "default-light", + "site-title": "🍄 MycorrhizaWiki", + "title-templates": { + "edit-hypha": "Edit %s at MycorrhizaWiki", + "view-hypha": "%s at MycorrhizaWiki" + }, + "mycelia": [ + { + "names": ["main"], + "type": "main" + }, + { + "names": ["sys", "system"], + "type": "system" + }, + { + "names": ["spec", "special"], + "type": "special" + }, + { + "names": ["user","u"], + "type": "user" + }, + { + "names": ["tag", "t"], + "type": "tag" + } + ] +} diff --git a/w/favicon.ico b/wiki/favicon.ico similarity index 100% rename from w/favicon.ico rename to wiki/favicon.ico diff --git a/w/m/README.md b/wiki/main/README.md similarity index 100% rename from w/m/README.md rename to wiki/main/README.md diff --git a/w/m/Fruit/1.md b/wiki/main/fruit/1.md similarity index 100% rename from w/m/Fruit/1.md rename to wiki/main/fruit/1.md diff --git a/w/m/Fruit/2.md b/wiki/main/fruit/2.md similarity index 100% rename from w/m/Fruit/2.md rename to wiki/main/fruit/2.md diff --git a/w/m/Fruit/3.markdown b/wiki/main/fruit/3.markdown similarity index 98% rename from w/m/Fruit/3.markdown rename to wiki/main/fruit/3.markdown index e99cd53..f0d9e17 100644 --- a/w/m/Fruit/3.markdown +++ b/wiki/main/fruit/3.markdown @@ -1,4 +1,4 @@ -According to real *scientists*, fruit is a type of fetus. Most of them are tasty and cool, though some of them are really sour and depressing. Be careful when choosing fruit. Best ones are: - -* [Apple](Apple) +According to real *scientists*, fruit is a type of fetus. Most of them are tasty and cool, though some of them are really sour and depressing. Be careful when choosing fruit. Best ones are: + +* [Apple](Apple) * [Pear](Pear) \ No newline at end of file diff --git a/w/m/Fruit/4.markdown b/wiki/main/fruit/4.markdown similarity index 100% rename from w/m/Fruit/4.markdown rename to wiki/main/fruit/4.markdown diff --git a/w/m/Fruit/5.markdown b/wiki/main/fruit/5.markdown similarity index 100% rename from w/m/Fruit/5.markdown rename to wiki/main/fruit/5.markdown diff --git a/w/m/Fruit/Apple/1.jpg b/wiki/main/fruit/apple/1.jpg similarity index 100% rename from w/m/Fruit/Apple/1.jpg rename to wiki/main/fruit/apple/1.jpg diff --git a/w/m/Fruit/Apple/1.txt b/wiki/main/fruit/apple/1.txt similarity index 100% rename from w/m/Fruit/Apple/1.txt rename to wiki/main/fruit/apple/1.txt diff --git a/w/m/Fruit/Apple/2.jpg b/wiki/main/fruit/apple/2.jpg similarity index 100% rename from w/m/Fruit/Apple/2.jpg rename to wiki/main/fruit/apple/2.jpg diff --git a/w/m/Fruit/Apple/2.txt b/wiki/main/fruit/apple/2.txt similarity index 99% rename from w/m/Fruit/Apple/2.txt rename to wiki/main/fruit/apple/2.txt index 77b6494..64ad8c8 100644 --- a/w/m/Fruit/Apple/2.txt +++ b/wiki/main/fruit/apple/2.txt @@ -1,3 +1,3 @@ -Красное яблоко. Для съёмки использовалась белая бумага позади и над яблоком, и фотовспышка SB-600 в 1/4 мощности. - +Красное яблоко. Для съёмки использовалась белая бумага позади и над яблоком, и фотовспышка SB-600 в 1/4 мощности. + Source: https://commons.wikimedia.org/wiki/File:Red_Apple.jpg \ No newline at end of file diff --git a/w/m/Fruit/Apple/3.txt b/wiki/main/fruit/apple/3.txt similarity index 98% rename from w/m/Fruit/Apple/3.txt rename to wiki/main/fruit/apple/3.txt index 84903ab..c00151c 100644 --- a/w/m/Fruit/Apple/3.txt +++ b/wiki/main/fruit/apple/3.txt @@ -1,6 +1,6 @@ -Mycorrhiza is pure happiness - -Красное яблоко. Для съёмки использовалась белая бумага позади и над яблоком, и фотовспышка SB-600 в 1/4 мощности. - -Source: https://commons.wikimedia.org/wiki/File:Red_Apple.jpg +Mycorrhiza is pure happiness + +Красное яблоко. Для съёмки использовалась белая бумага позади и над яблоком, и фотовспышка SB-600 в 1/4 мощности. + +Source: https://commons.wikimedia.org/wiki/File:Red_Apple.jpg \ No newline at end of file diff --git a/w/m/Fruit/Apple/4.jpg b/wiki/main/fruit/apple/4.jpg similarity index 100% rename from w/m/Fruit/Apple/4.jpg rename to wiki/main/fruit/apple/4.jpg diff --git a/w/m/Fruit/Apple/4.txt b/wiki/main/fruit/apple/4.txt similarity index 99% rename from w/m/Fruit/Apple/4.txt rename to wiki/main/fruit/apple/4.txt index 4cfa047..4281d69 100644 --- a/w/m/Fruit/Apple/4.txt +++ b/wiki/main/fruit/apple/4.txt @@ -1,2 +1,2 @@ -Я́блоко — сочный плод яблони, который употребляется в пищу в свежем виде, служит сырьём в кулинарии и для приготовления напитков. Наибольшее распространение получила яблоня домашняя, реже выращивают яблоню сливолистную. Размер красных, зелёных или жёлтых шаровидных плодов 5—13 см в диаметре. Происходит из Центральной Азии, где до сих пор произрастает дикорастущий предок яблони домашней — яблоня Сиверса. На сегодняшний день существует множество сортов этого вида яблони, произрастающих в различных климатических условиях. По времени созревания отличают летние, осенние и зимние сорта, более поздние сорта отличаются хорошей стойкостью. +Я́блоко — сочный плод яблони, который употребляется в пищу в свежем виде, служит сырьём в кулинарии и для приготовления напитков. Наибольшее распространение получила яблоня домашняя, реже выращивают яблоню сливолистную. Размер красных, зелёных или жёлтых шаровидных плодов 5—13 см в диаметре. Происходит из Центральной Азии, где до сих пор произрастает дикорастущий предок яблони домашней — яблоня Сиверса. На сегодняшний день существует множество сортов этого вида яблони, произрастающих в различных климатических условиях. По времени созревания отличают летние, осенние и зимние сорта, более поздние сорта отличаются хорошей стойкостью. \ No newline at end of file diff --git a/w/m/Fruit/Apple/meta.json b/wiki/main/fruit/apple/meta.json similarity index 100% rename from w/m/Fruit/Apple/meta.json rename to wiki/main/fruit/apple/meta.json diff --git a/w/m/Fruit/meta.json b/wiki/main/fruit/meta.json similarity index 100% rename from w/m/Fruit/meta.json rename to wiki/main/fruit/meta.json diff --git a/w/m/Fruit/Pear/1.markdown b/wiki/main/fruit/pear/1.markdown similarity index 99% rename from w/m/Fruit/Pear/1.markdown rename to wiki/main/fruit/pear/1.markdown index 93010b8..0ec9c6b 100644 --- a/w/m/Fruit/Pear/1.markdown +++ b/wiki/main/fruit/pear/1.markdown @@ -1,3 +1,3 @@ -A **pear** is a sweet fruit, usually with a green skin and a lot of juice, that has a round base and is slightly pointed towards the stem. - +A **pear** is a sweet fruit, usually with a green skin and a lot of juice, that has a round base and is slightly pointed towards the stem. + Source of info: [cambridge dict](https://dictionary.cambridge.org/ru/словарь/английский/pear) \ No newline at end of file diff --git a/w/m/Fruit/Pear/meta.json b/wiki/main/fruit/pear/meta.json similarity index 100% rename from w/m/Fruit/Pear/meta.json rename to wiki/main/fruit/pear/meta.json diff --git a/w/m/Fruit/Pineapple/1.html b/wiki/main/fruit/pineapple/1.html similarity index 100% rename from w/m/Fruit/Pineapple/1.html rename to wiki/main/fruit/pineapple/1.html diff --git a/w/m/Fruit/Pineapple/meta.json b/wiki/main/fruit/pineapple/meta.json similarity index 100% rename from w/m/Fruit/Pineapple/meta.json rename to wiki/main/fruit/pineapple/meta.json diff --git a/w/m/Fungus/1.markdown b/wiki/main/fungus/1.markdown similarity index 100% rename from w/m/Fungus/1.markdown rename to wiki/main/fungus/1.markdown diff --git a/w/m/Fungus/Amanita Muscaria/1.markdown b/wiki/main/fungus/amanita_muscaria/1.markdown similarity index 99% rename from w/m/Fungus/Amanita Muscaria/1.markdown rename to wiki/main/fungus/amanita_muscaria/1.markdown index 2516173..60438ef 100644 --- a/w/m/Fungus/Amanita Muscaria/1.markdown +++ b/wiki/main/fungus/amanita_muscaria/1.markdown @@ -1,3 +1,3 @@ -Amanita muscaria, commonly known as the fly agaric or fly amanita, is a basidiomycete of the genus Amanita. It is also a muscimol mushroom. Native throughout the temperate and boreal regions of the Northern Hemisphere, Amanita muscaria has been unintentionally introduced to many countries in the Southern Hemisphere, generally as a symbiont with pine and birch plantations, and is now a true cosmopolitan species. It associates with various deciduous and coniferous trees. - +Amanita muscaria, commonly known as the fly agaric or fly amanita, is a basidiomycete of the genus Amanita. It is also a muscimol mushroom. Native throughout the temperate and boreal regions of the Northern Hemisphere, Amanita muscaria has been unintentionally introduced to many countries in the Southern Hemisphere, generally as a symbiont with pine and birch plantations, and is now a true cosmopolitan species. It associates with various deciduous and coniferous trees. + It is not an [](Apple)! \ No newline at end of file diff --git a/w/m/Fungus/Amanita Muscaria/2.markdown b/wiki/main/fungus/amanita_muscaria/2.markdown similarity index 99% rename from w/m/Fungus/Amanita Muscaria/2.markdown rename to wiki/main/fungus/amanita_muscaria/2.markdown index 2399b27..a1ed53d 100644 --- a/w/m/Fungus/Amanita Muscaria/2.markdown +++ b/wiki/main/fungus/amanita_muscaria/2.markdown @@ -1,4 +1,4 @@ -Amanita muscaria, commonly known as the fly agaric or fly amanita, is a basidiomycete of the genus Amanita. It is also a muscimol mushroom. Native throughout the temperate and boreal regions of the Northern Hemisphere, Amanita muscaria has been unintentionally introduced to many countries in the Southern Hemisphere, generally as a symbiont with pine and birch plantations, and is now a true cosmopolitan species. It associates with various deciduous and coniferous trees. - -It is not an [Apple](Apple)! +Amanita muscaria, commonly known as the fly agaric or fly amanita, is a basidiomycete of the genus Amanita. It is also a muscimol mushroom. Native throughout the temperate and boreal regions of the Northern Hemisphere, Amanita muscaria has been unintentionally introduced to many countries in the Southern Hemisphere, generally as a symbiont with pine and birch plantations, and is now a true cosmopolitan species. It associates with various deciduous and coniferous trees. + +It is not an [Apple](Apple)! \ No newline at end of file diff --git a/w/m/Fungus/Amanita Muscaria/3.markdown b/wiki/main/fungus/amanita_muscaria/3.markdown similarity index 99% rename from w/m/Fungus/Amanita Muscaria/3.markdown rename to wiki/main/fungus/amanita_muscaria/3.markdown index ffeae56..a20fcfa 100644 --- a/w/m/Fungus/Amanita Muscaria/3.markdown +++ b/wiki/main/fungus/amanita_muscaria/3.markdown @@ -1,5 +1,5 @@ -Amanita muscaria, commonly known as the fly agaric or fly amanita, is a basidiomycete of the genus Amanita. It is also a muscimol mushroom. Native throughout the temperate and boreal regions of the Northern Hemisphere, Amanita muscaria has been unintentionally introduced to many countries in the Southern Hemisphere, generally as a symbiont with pine and birch plantations, and is now a true cosmopolitan species. It associates with various deciduous and coniferous trees. - -It is not an [Apple](/Apple)! - +Amanita muscaria, commonly known as the fly agaric or fly amanita, is a basidiomycete of the genus Amanita. It is also a muscimol mushroom. Native throughout the temperate and boreal regions of the Northern Hemisphere, Amanita muscaria has been unintentionally introduced to many countries in the Southern Hemisphere, generally as a symbiont with pine and birch plantations, and is now a true cosmopolitan species. It associates with various deciduous and coniferous trees. + +It is not an [Apple](/Apple)! + \ No newline at end of file diff --git a/w/m/Fungus/Amanita Muscaria/4.markdown b/wiki/main/fungus/amanita_muscaria/4.markdown similarity index 99% rename from w/m/Fungus/Amanita Muscaria/4.markdown rename to wiki/main/fungus/amanita_muscaria/4.markdown index 51eeda9..2d1edd4 100644 --- a/w/m/Fungus/Amanita Muscaria/4.markdown +++ b/wiki/main/fungus/amanita_muscaria/4.markdown @@ -1,6 +1,6 @@ -Amanita muscaria, commonly known as the fly agaric or fly amanita, is a basidiomycete of the genus Amanita. It is also a muscimol mushroom. Native throughout the temperate and boreal regions of the Northern Hemisphere, Amanita muscaria has been unintentionally introduced to many countries in the Southern Hemisphere, generally as a symbiont with pine and birch plantations, and is now a true cosmopolitan species. It associates with various deciduous and coniferous trees. - -It is not an [Apple](/Fruit/Apple)! - - +Amanita muscaria, commonly known as the fly agaric or fly amanita, is a basidiomycete of the genus Amanita. It is also a muscimol mushroom. Native throughout the temperate and boreal regions of the Northern Hemisphere, Amanita muscaria has been unintentionally introduced to many countries in the Southern Hemisphere, generally as a symbiont with pine and birch plantations, and is now a true cosmopolitan species. It associates with various deciduous and coniferous trees. + +It is not an [Apple](/Fruit/Apple)! + + \ No newline at end of file diff --git a/w/m/Fungus/Amanita Muscaria/meta.json b/wiki/main/fungus/amanita_muscaria/meta.json similarity index 100% rename from w/m/Fungus/Amanita Muscaria/meta.json rename to wiki/main/fungus/amanita_muscaria/meta.json diff --git a/w/m/Fungus/Amanita Regalis/1.jpeg b/wiki/main/fungus/amanita_regalis/1.jpeg similarity index 100% rename from w/m/Fungus/Amanita Regalis/1.jpeg rename to wiki/main/fungus/amanita_regalis/1.jpeg diff --git a/w/m/Fungus/Amanita Regalis/1.markdown b/wiki/main/fungus/amanita_regalis/1.markdown similarity index 99% rename from w/m/Fungus/Amanita Regalis/1.markdown rename to wiki/main/fungus/amanita_regalis/1.markdown index 7ea6c4c..e9bd635 100644 --- a/w/m/Fungus/Amanita Regalis/1.markdown +++ b/wiki/main/fungus/amanita_regalis/1.markdown @@ -1,7 +1,7 @@ -Шляпка 7—16(20) см в диаметре, полушаровидная, раскрывающаяся до выпуклой и почти плоской со слабо вдавленным центром, с радиально разлинованным краем. Окраска тёмно-умброво-коричневая, оливково-охристая, охристо-коричневая, иногда серо-жёлтая, в центре более интенсивная. Общее покрывало на молодых грибах опушённое, ярко-жёлтое, затем остаётся в виде легко смываемых обрывков, на солнце белеющих, а к старости иногда становящихся серо-жёлтыми. - - -Пластинки частые, сначала узко-приросшие к ножке, затем свободные от неё, кремовые, с многочисленными пластиночками разной длины. - - +Шляпка 7—16(20) см в диаметре, полушаровидная, раскрывающаяся до выпуклой и почти плоской со слабо вдавленным центром, с радиально разлинованным краем. Окраска тёмно-умброво-коричневая, оливково-охристая, охристо-коричневая, иногда серо-жёлтая, в центре более интенсивная. Общее покрывало на молодых грибах опушённое, ярко-жёлтое, затем остаётся в виде легко смываемых обрывков, на солнце белеющих, а к старости иногда становящихся серо-жёлтыми. + + +Пластинки частые, сначала узко-приросшие к ножке, затем свободные от неё, кремовые, с многочисленными пластиночками разной длины. + + Ножка достигает 9—20 см в высоту и 1—2,5 см в поперечнике, утончающаяся кверху, в основании с яйцевидным или шаровидным утолщением. Поверхность ножки волокнисто-бархатистая, белая или беловатая, при прикосновении иногда слабо буреющая. Кольцо в верхней части ножки, беловатое, перепончатое, не разлинованное. Остатки общего покрывала в виде нескольких поясков желтоватых бородавчатых хлопьев на утолщении ножки. \ No newline at end of file diff --git a/w/m/Fungus/Amanita Regalis/meta.json b/wiki/main/fungus/amanita_regalis/meta.json similarity index 100% rename from w/m/Fungus/Amanita Regalis/meta.json rename to wiki/main/fungus/amanita_regalis/meta.json diff --git a/w/m/Fungus/meta.json b/wiki/main/fungus/meta.json similarity index 100% rename from w/m/Fungus/meta.json rename to wiki/main/fungus/meta.json diff --git a/wiki/main/help/1.markdown b/wiki/main/help/1.markdown new file mode 100644 index 0000000..7581886 --- /dev/null +++ b/wiki/main/help/1.markdown @@ -0,0 +1 @@ +# Help \ No newline at end of file diff --git a/w/m/Templates/meta.json b/wiki/main/help/meta.json similarity index 75% rename from w/m/Templates/meta.json rename to wiki/main/help/meta.json index 45204e2..354427e 100644 --- a/w/m/Templates/meta.json +++ b/wiki/main/help/meta.json @@ -6,10 +6,10 @@ "tags": [ "" ], - "name": "Templates", - "comment": "Update Templates", + "name": "Help", + "comment": "Update Help", "author": "", - "time": 1593194769, + "time": 1593540573, "text_mime": "text/markdown", "binary_mime": "", "text_name": "1.markdown", diff --git a/wiki/main/help/mycelia/1.markdown b/wiki/main/help/mycelia/1.markdown new file mode 100644 index 0000000..b86210e --- /dev/null +++ b/wiki/main/help/mycelia/1.markdown @@ -0,0 +1,85 @@ +In MycorrhizaWiki **mycelia** are used to organize [hyphae](hyphae) in related namespaces. + +## Mycelium traits +- Every mycelium has any number (0..∞) of hyphae. +- Every hypha is part of one mycelium. +- Every mycelium has one canonical name and any number of synonyms. +- Every wiki has one main mycelium. +- They are named by the same scheme as hyphae but they have a colon prefix. + +## Mycelium URL +- Address a hypha in a particular mycelium: `/:sys/about`. +- Address subpage of the hypha above: `/:sys/about/more` +- Address a hypha in the main mycelium: `/How/does it work`. +- Address a hypha in the main mycelium explicitly: `/:main/How/does it work`. + +## Mycelium configuration +In your `config.json`, in `"mycelia"` field there is an array of objects. + +``` +{ + ... + "mycelia": [ + { + "names": ["main"], + "type": "main" + }, + { + "names": ["sys", "system"], + "type": "system" + }, + { + "names": ["spec", "special"], + "type": "special" + }, + { + "names": ["user","u"], + "type": "user" + }, + { + "names": ["tag", "t"], + "type": "tag" + } + ] + ... +} +``` + +Each object reprents a mycelium. You can set all their names there. First name in each `"names"` array is a canonical name for the mycelium. + +Field `"type"` sets the mycelium's type. There are such types: + +| **Type** | **Description** | +| `main` | The main mycelium. There must be exactly one such mycelium in a wiki. | +| `system` | Things like scripts, styles and templates go here. There must be exactly one such mycelium in a wiki. | +| `special` | Things like utility hyphae and plugin pages go here. It is optional because there are no hyphae or plugins now. | +| `user` | Userpages. It is optional because there are no users now. | +| `tag` | Pages describing tags. It is optional because there are no tags now. | +| `other` | Mycelia without any additional meaning added by the engine. There can be any number of them. | + +## How are they stored in the filesystem. +For example, `wiki` is your wiki directory and you have configured the mycelia like in the example above. You should have structure like that: + +``` +wiki/ + config.json ← your configuration + favicon.ico ← your site icon + main/ ← :main,Good types are text/markdown and text/plain
Please make your comment helpful
+ + +Tags are separated by commas, whitespace is ignored
+ + +If this hypha has a file like that, the text above is meant to be a description of it
+ + ++ + Cancel +
+Saved successfully. Go back
- - + + +Saved successfully. Go back
+ + diff --git a/w/m/Templates/default-light/updateOk.html/meta.json b/wiki/sys/theme/default-light/update_ok.html/meta.json similarity index 90% rename from w/m/Templates/default-light/updateOk.html/meta.json rename to wiki/sys/theme/default-light/update_ok.html/meta.json index 5662fd2..b1ac640 100644 --- a/w/m/Templates/default-light/updateOk.html/meta.json +++ b/wiki/sys/theme/default-light/update_ok.html/meta.json @@ -4,7 +4,7 @@ "revisions": { "1": { "tags": null, - "name": "updateOk.html", + "name": "update_ok.html", "comment": "Create Templates/default-light/updateOk.html", "author": "", "time": 1592996644, @@ -14,4 +14,4 @@ "binary_name": "" } } -} \ No newline at end of file +} diff --git a/wiki/sys/theme/default-light/view/404.html/1.html b/wiki/sys/theme/default-light/view/404.html/1.html new file mode 100644 index 0000000..1a16087 --- /dev/null +++ b/wiki/sys/theme/default-light/view/404.html/1.html @@ -0,0 +1,6 @@ ++ The hypha you are trying to access does not exist yet. Why not create it? +
+