krasimir / techy

A flat file CMS based on Gulp and AbsurdJS
http://krasimir.github.io/techy
MIT License
250 stars 23 forks source link

Subdirectory pages have no style #10

Closed zalun closed 10 years ago

zalun commented 10 years ago

Pages created in subdirectory are trying to load template files from its directory. example: http://zalun.github.io/NetPlayer/ code: https://github.com/zalun/zalun.github.io/blob/master/NetPlayer/index.md

krasimir commented 10 years ago

In order to get the paths set properly you need to run techy in the main directory. If you go to /NetPlayer Techy thinks that this is the root of the projects and uses that as a starting point.

I forked your repo and simply run techy in the main directory. Here is how the index.html in NetPlayer folder looks like https://github.com/krasimir/zalun.github.io/blob/master/NetPlayer/index.html

zalun commented 10 years ago

I did it from the main dir ... I will try to update (using OSX) Nope - no difference - still no "../"

krasimir commented 10 years ago

Ok, let me know if it works.

zalun commented 10 years ago

As above (updated the comment)

krasimir commented 10 years ago

Ok, can you please commit the latest files in your repo (if not already) and I'll investigate further.

zalun commented 10 years ago

There is quite a lot of path findings based on backslashes - https://github.com/krasimir/techy/blob/master/lib/Factory.js That might be the reason, but I haven't been really debugging it

zalun commented 10 years ago

I did

krasimir commented 10 years ago

Yep, there is a getPagePaths method which should in theory set the paths properly. It is interesting that under Windows7 your project compiles just fine. I'll try later under Ubuntu.

zalun commented 10 years ago

It is the same on Ubuntu on my side

krasimir commented 10 years ago

I'm almost finished with #9 and will dig in to the issue.

zalun commented 10 years ago

Found out it's the same with tags (took your repo) link to tags is articles/tags/tagname.html and opposite - link from tags to article - tags/articles/articlename.html https://github.com/zalun/zalun.github.io/ as an example of the result after changing the content

krasimir commented 10 years ago

Damn ... I really have no idea what is going on. Sorry, I'll need more time to find the problem.

krasimir commented 10 years ago

The problem is fixed. Please install the latest 0.0.43 version and try again. It was a OS related path issue.

zalun commented 10 years ago

Brilliant - thanks

zalun commented 10 years ago

site updated - I can start work on moving my URL to this - yay!

krasimir commented 10 years ago

(Y) I should thank you for posting this issue because the problem probably occur on many users.