Serving pages without .html and idealized folder structure #25

Closed
opened 2018-04-24 17:18:07 +02:00 by kauffj · 5 comments
kauffj commented 2018-04-24 17:18:07 +02:00 (Migrated from github.com)
  • All Markdown content is contained within a single folder (additional organization can exist within this folder, if necessary or desired, but it should not be necessary to call every file index.md).
  • All first-class pages as well as resource articles can be served by URLs that do not include a trailing .html or an indication of the folder structure. E.g. lbry.tech/repository-standards should serve the Markdown file located at resources/repository-stanards.md).
- [ ] All Markdown content is contained within a single folder (additional organization can exist within this folder, if necessary or desired, but it should not be necessary to call every file `index.md`). - [ ] All first-class pages as well as resource articles can be served by URLs that do not include a trailing `.html` or an indication of the folder structure. E.g. lbry.tech/repository-standards should serve the Markdown file located at `resources/repository-stanards.md`).
Krisseck commented 2018-04-25 10:00:57 +02:00 (Migrated from github.com)

We are currently using Node.js + express. I tried implementing this but the internal links in Vuepress will not work with this.

Here is the related issue on Vuepress repo.

So their solution this currently is that if you want to make for example page /resources, you can make resources/index.md, which will work. I would personally much rather have working rewrites though :)

We are currently using Node.js + express. I tried implementing this but the internal links in Vuepress will not work with this. [Here is the related issue on Vuepress repo.](https://github.com/vuejs/vuepress/issues/78) So their solution this currently is that if you want to make for example page /resources, you can make resources/index.md, which will work. I would personally much rather have working rewrites though :)
Krisseck commented 2018-04-27 12:14:09 +02:00 (Migrated from github.com)

I have now spent a day researching this, and I am afraid this is currently not possible.

It's easy to set express rewrite rules to remove .html extension from urls, but in addition Vuepress uses it's own Vue-router to handle internal links. It generates a router config object on startup and this cannot be dynamically changed later. And it doesn't seem to offer any way for plugins to modify it.

I have now spent a day researching this, and I am afraid this is currently not possible. It's easy to set express rewrite rules to remove .html extension from urls, but in addition Vuepress uses it's own Vue-router to handle internal links. It generates a router config object on startup and this cannot be dynamically changed later. And it doesn't seem to offer any way for plugins to modify it.
kauffj commented 2018-04-27 21:14:13 +02:00 (Migrated from github.com)

So is the solution to source each article from a folder?

So is the solution to source each article from a folder?
kauffj commented 2018-05-23 23:40:18 +02:00 (Migrated from github.com)

@Krisseck this issue has been edited based on discussion on standup today. I know Vuepress may not make this that easy. If it's non-trivial to reach the ideal specified above, please let me know how close we can get.

@Krisseck this issue has been edited based on discussion on standup today. I know Vuepress may not make this that easy. If it's non-trivial to reach the ideal specified above, please let me know how close we can get.
Krisseck commented 2018-05-30 11:25:40 +02:00 (Migrated from github.com)
Made a new branch for this: https://github.com/lbryio/lbry.tech/tree/content-reorganize
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry.tech#25
No description provided.