Raneto
Raneto copied to clipboard
Urls generated with full file path on Windows
This problem https://github.com/gilbitron/Raneto/issues/8 re-appears in 0.9.0.. The solution pretty much the same, in raneto-core\lib\raneto.js line number 146:
var dir = raneto.config.content_dir.replace(/\\/g, "/");
var shortPath = filePath.replace(dir, '').trim();
Thanks zaunaf for narrowing down the issue with the file and lines. Has something to do with filepaths and we need to normalize
If someone has time this weekend, here's an article that helps. http://shapeshed.com/writing-cross-platform-node/ Please comment before you start working on it so we don't duplicate your efforts :)
This seemed to fix it for me. Thanks. :+1:
Not sure if this is related or not, but when searching on Windows, I get Cannot read property 'excerpt' of null
. Thanks for the help.
Hello, I ran into the issue yesterday and I'd like to take it into work.
I am also getting the "Cannot read property 'excerpt' of null" error message when searching an article. Line 146 mentioned above is:
slug = slug.replace('.md', '').trim();
How to apply the fix?
Around line 188 I see code that addresses the shortPath
:
files.forEach(function (filePath) {
var shortPath = path.normalize(filePath).replace(content_dir, '').trim();
var stat = fs.lstatSync(filePath);
Is this code already supposed to account for the fix mentioned above? If so, it doesn't resolve the "Cannot read proprty 'excerpt' when searching.
@gallarotti this might be another issue. Are you on the latest version of Raneto? (v0.10.1)
I'll dig into it more this weekend. Any additional info you can provide (OS, Node version, etc) would help narrow it down
Hey @ryanlelek, I'm getting the same issue as @gallarotti. The fix supplied didn't help (or I'm doing something wrong).
OS: Win10 Pro64 Node: 4.4.7 Raneto: 0.10.1
Thanks!
Booting a Windows 10 Pro x64 VM right now to help diagnose
Ok, all booted up fine with these commands. I was able to browse and login
Code used is the master branch as of the time of this comment.
From project directory run:
npm install
npm run start_win