Open kaihendry opened 5 years ago
It is matching links to current page, no wonder it is not working for relative links, i should probably use path.resolve
somewhere in the code. Will work on it soon.
As a side note, you probably can add .mdwn
to webpack config, renaming was a fast way for me to try thing out.
Thanks! Renaming to .md wasn't an issue. The permalink stuff was a pain. Can I sanely avoid the "README.md" construct?
And I've yet to figure out blogs / RSS et al
I see that you using permalink /API/
inside api.md
, no sure what is the relation to README.md
does readme woks like index?
If it works as a link inside vuepress it should work with plugin otherwise it makes no sense.
There is a blog plugin, i did not used it yet, and there is also sitemap plugin that generates xml, i am sure rss will not be a problem
@kaihendry i am not sure about state of my mind when i started this, but this mess is getting only worse... needs complete rewrite, i understand how vuepress works now.
what i am trying to say - looks like it works now
I think it's working! https://s.natalian.org/2018-12-18/blog.mp4
Thank you! https://github.com/Webconverger/wiki/commit/2c908454f9917de6a6f466ef6c7abcb24da9586d
I'll test it further.
there is
this.$page.pageLinks
with .title
as mentioned in content
click [here](./post)
will have title: "here"
this.$pageLinks
computed property with correct .title
from page itself
Some pages linked from home, e.g. https://beta.webconverger.org/system_integrators/ don't have a backlink. Any ideas why?
https://github.com/Webconverger/wiki/blob/vuepress/system_integrators.md
home page contains [About Webconverger](/about/)
and system_integrators.md
got "permalink": "/system_integrators/"
i am not even how it works and where is /about defined as redirect
EDIT: If permalink is /about it works. There is no need to replace default sidebar, it might be useful on long pages, Layout.vue
sidebarItems() {
const defaultSidebar = resolveSidebarItems(
this.$page,
this.$page.regularPath,
this.$site,
this.$localePath
)
return defaultSidebar
.concat(
this.$backLinks.length > 0
? [
{
title: "Back Links",
type: "group",
children: this.$backLinks,
},
]
: []
)
.concat(
this.$pageLinks.length > 0
? [
{
title: "Forward Links",
type: "group",
children: this.$pageLinks,
},
]
: []
)
},
{
"title": "Webconverger for system integrators",
"permalink": "/about/",
"sidebar" : "auto",
}
Trying to grok Vuepress themes. https://vuepress.vuejs.org/theme/writing-a-theme.html#content-outlet
It seems that just copying in Layout.vue with your method above (it's a method right?)
wiki$ find .vuepress/theme/ -type f
.vuepress/theme/layouts/Layout.vue
Isn't enough..
I have to copy in the whole theme? VuePress document implied some elements were optional and I assumed it would just defer to default theme for missing elements. Guess not!
not really sure what is the correct method... it looks like you copied whole theme in your wiki. so i assumed it should work.
but i just replace imports in files i copy, works
import Home from "@vuepress/theme-default/components/Home.vue"
import Navbar from "@vuepress/theme-default/components/Navbar.vue"
import Page from "@vuepress/theme-default/components/Page.vue"
import Sidebar from "@vuepress/theme-default/components/Sidebar.vue"
import { resolveSidebarItems } from "@vuepress/theme-default/util"
I tried it, but I didn't work. I guess I revert to the full theme with your sidebar method?
Sorry, on holiday so only had a few minutes to try. I committed my changes on the vuepress branch though.
https://github.com/Webconverger/wiki/commits/vuepress
As you can see no backlinks are shown here: https://beta.webconverger.org/API/ https://s.natalian.org/2018-12-09/backlinks.mp4
I think it's because I have moved from
[[API]]
to[API](/API/)
style relative links?I am trying not to use that weird
/API/README.html
structure, but maybe I don't have a choice? Happy to make changes as you suggest.