jdan / cleaver-retro

A dark retro theme for cleaver
6 stars 16 forks source link

jdan/cleaver-retro not working (at least behind proxy) #1

Closed adriens closed 9 years ago

adriens commented 9 years ago

Hi, i could not succeed to use themes (no theme works perfectly). I think that the problem comes from getting the resources from the web. My git inconfigured to go to the web , as well as wget. Here is the kind of logs i can get in debug mode :

salad74@themint:~/NetBeansProjects/presentation-idd-cloud > cleaver --debug presentation.md cleaver loaded input document +0ms helper read /usr/local/lib/node_modules/cleaver/templates/layout.mustache +2ms helper read /usr/local/lib/node_modules/cleaver/resources/github.css +0ms helper read /usr/local/lib/node_modules/cleaver/resources/default.css +0ms helper read /usr/local/lib/node_modules/cleaver/resources/script.js +0ms cleaver loaded static assets +0ms helper read /usr/local/lib/node_modules/cleaver/templates/author.mustache +0ms helper read /usr/local/lib/node_modules/cleaver/templates/default.mustache +0ms cleaver loaded templates +0ms cleaver parsed options +3ms helper Error: connect ETIMEDOUT: https://raw.githubusercontent.com/jdan/cleaver-retro/master/settings.json +2m helper Error: connect ETIMEDOUT: https://raw.githubusercontent.com/jdan/cleaver-retro/master/style.css +2ms helper Error: connect ETIMEDOUT: https://raw.githubusercontent.com/jdan/cleaver-retro/master/template.mustache +1ms helper Error: connect ETIMEDOUT: https://raw.githubusercontent.com/jdan/cleaver-retro/master/layout.mustache +0ms helper Error: connect ETIMEDOUT: https://raw.githubusercontent.com/jdan/cleaver-retro/master/script.js +0ms cleaver loaded theme +0ms cleaver rendered slides +2ms cleaver rendered presentation +1ms

When i go to https://raw.githubusercontent.com/jdan/cleaver-retro/master with my browser i get :+1:

400: Invalid request

So, my question is : how does cleaver download its resources ? Does it use curl, or any other protocol i need to setup so cleaver can go on the web to get its resources ?

Thank you in advance for your help.

Kind Regards,

Adrien

adriens commented 9 years ago

When i wget one of the resources, it's ok :+1:

`salad74@themint:~/NetBeansProjects/presentation-idd-cloud > wget https://raw.githubusercontent.com/sudodoki/reveal-cleaver-theme/master/layout.mustache --2015-07-16 07:39:11-- https://raw.githubusercontent.com/sudodoki/reveal-cleaver-theme/master/layout.mustache Resolving proxyweb.site-mairie.noumea.nc (proxyweb.site-mairie.noumea.nc)... 172.16.80.2, 172.16.80.3 Connecting to proxyweb.site-mairie.noumea.nc (proxyweb.site-mairie.noumea.nc)|172.16.80.2|:3128... connected. Proxy request sent, awaiting response... 200 OK Length: 404 [text/plain] Saving to: ‘layout.mustache’

100%[========================================================================================================================================================================>] 404 --.-K/s in 0s

2015-07-16 07:39:12 (86.0 MB/s) - ‘layout.mustache’ saved [404/404]`

jdan commented 9 years ago

https://raw.githubusercontent.com/jdan/cleaver-retro/master/style.css is the only URL which should be loading, the others do not exist. Cleaver themes do not needs to have templates, but cleaver will look for them (and fail) anyway. Does that URL work for you?

adriens commented 9 years ago

yes, in the browser andin wget i can get the file : `wget https://raw.githubusercontent.com/jdan/cleaver-retro/master/style.css --2015-07-16 08:14:17-- https://raw.githubusercontent.com/jdan/cleaver-retro/master/style.css Resolving proxyweb.site-mairie.noumea.nc (proxyweb.site-mairie.noumea.nc)... 172.16.80.3, 172.16.80.2 Connecting to proxyweb.site-mairie.noumea.nc (proxyweb.site-mairie.noumea.nc)|172.16.80.3|:3128... connected. Proxy request sent, awaiting response... 200 OK Length: 370 [text/plain] Saving to: ‘style.css’

100%[========================================================================================================================================================================>] 370 --.-K/s in 0s

2015-07-16 08:14:18 (75.3 MB/s) - ‘style.css’ saved [370/370]`

Still, through cleaver i does not get the file with the following style :+1:

title: My Presentation theme: sudodoki/reveal-cleaver-theme

How does cleaver/npm get the files ? Does he do it through curl ?

adriens commented 9 years ago

I think the mai question is how can i configure cleaver to use a local http_proxy variable to mmake it possible to get on the web through the proxy, so this kind of code :+1:

if (url.match(/^https/)) { get = https.get(url, cb); } else { get = http.get(url, cb); }

could work.

Any idea on where to set that ?

adriens commented 9 years ago

This kind of things is in relation with the issue i'm currently facing in my corporate environment (it works perfectly at home)

https://github.com/joyent/node/issues/9365

adriens commented 9 years ago

https://groups.google.com/forum/#!topic/nodejs/8sYb2KOVSso

jdan commented 9 years ago

Okay sounds like it's not specific to this repo then? Let me know if I'm wrong and we can revisit.

adriens commented 9 years ago

Hmmmm, i wouldn't say that. Your code should be able to load (if exists) the $http_proxy env variable to make usage of skins available behind a proxy. From what i've seen, the http.get can manage these kind of settings.

jdan commented 9 years ago

@adriens I disagree. Seems like I should be able to just fetch a URL, and something external should handle the proxy business.

adriens commented 9 years ago

Jdan, i'm currently searching on how to do that out your code... hopefully will have some workaround.