Logs for #nikola for 2015-12-14

13:18:21 <dmmmd> Hello! I am new to Nikola. I was experimenting with hosting a static site in my ~/Dropbox/Public/ . If I set PRETTY_URLS = False the site functions as I would expect except for one item: The href in the link to the site title lacks an "index.html"
13:18:25 <dmmmd> https://dl.dropboxusercontent.com/u/3067838/my-site-no-pretty/
13:18:52 <dmmmd> I have perused the conf.py and documentation and can't seem to figure out how to add an "index.html" to that href.
13:18:56 <dmmmd> Thanks in advance.
13:19:01 <dmmmd> https://dl.dropboxusercontent.com/u/3067838/my-site-no-pretty/index.html
13:20:38 <dmmmd> The Public directory in Dropbox requires full urls to work. A trailing / does not serve a default document such as "index.html"
13:22:33 <dmmmd> setting PRETTY_URLS to True does not function well at all since the nav links lack "index.html": https://dl.dropboxusercontent.com/u/3067838/my-site/index.html
13:24:49 <dmmmd> The Archives link has "index.html" and the Tags link does not.
13:25:18 <ralsina> dmmmd: check your conf.py
13:25:35 <dmmmd> For?
13:25:37 <ralsina> most of those are set in NAVIGATION_LINKS
13:26:04 <dmmmd> Ok. I shall try that.
13:26:09 <dmmmd> Thanks for the tip.
13:26:19 <ralsina> and the link at the name of the site is SITE_URL
13:26:33 <ralsina> also in conf.py
13:26:57 <dmmmd> ok. That sounds promising.
13:26:59 <dmmmd> I'm almost there.
13:27:07 <dmmmd> Thanks!
13:28:44 <ralsina> you're welcome
13:32:41 <dmmmd> I added "index.html" to the end of SITE_URL and that breaks everything. SITE_URL must have be a directory.
13:32:56 <dmmmd> I'm going to mess with NAVIGATION_LINKS now.
13:35:29 <ralsina> dmmmd: if you set SITE_URL also set BASE_URL to the value SITE_URL had before, sorry
13:35:48 <dmmmd> Yes! That sounds like it will work.
13:35:49 <dmmmd> Thanks.
13:39:17 <dmmmd> I set the following:
13:39:18 <dmmmd> BASE_URL = "https://dl.dropboxusercontent.com/u/3067838/my-site-no-pretty/"
13:39:18 <dmmmd> SITE_URL = ''.join((BASE_URL, "index.html"))
13:39:47 <dmmmd> Still no "index.html" in the site title in the nav bar.
13:41:44 <dmmmd> That href must use BASE_URL.
14:33:39 <ChrisWarrick> dmmmd: SITE_URL must be a directory. Try changing BASE_URL, the template, or your hosting provider (why not github pages?)
14:41:12 <ChrisWarrick> We're one of the suggested projects for today at 24 Pull Requests!
14:51:58 <ralsina> really? Neat
14:52:05 <ralsina> what's 24 pull requests? ;-)
14:53:03 <dmmmd> "SITE_URL must be a directory" I have it set to a file and it works as expected. I have BASE_URL set to a directory. It's functioning as expected. I think I will have to change a template.
14:53:07 <dmmmd> Thanks for the help.
14:56:39 <amokleben> ralsina: http://24pullrequests.com/
16:40:34 <guillom> Hello. I have a question and I couldn't find an answer in the handbook or the mailing list. Is it possible to generate thumbnails of different sizes, or is there only a single IMAGE_THUMBNAIL_SIZE ?
16:43:42 <ChrisWarrick> guillom: one size fits all
16:44:21 <guillom> Aww. Thanks for the response.
16:44:52 <guillom> That's kind of a dealbreaker for my use case :/ I'll continue looking for a generator.
16:45:43 <ChrisWarrick> guillom: What is your use case?
16:47:26 <guillom> ChrisWarrick: I need thumbnails of the same images in different sizes for several reasons: main-content-image vs. side-content image, responsive images with srcset, etc. and I need to be able to automate this based on the high-resolution source images.
16:47:34 <Aeyoun> guillom: see https://github.com/getnikola/nikola/issues/2154
16:50:53 <guillom> Thanks
16:51:34 <Aeyoun> guillom: something like this plus smaller images for the front page and RSS, right? https://www.slightfuture.com/review/sense-sleep-tracker.html
16:52:23 <guillom> Yeah, basically.
16:53:54 <guillom> And ideally, also SVG->PNG conversion, and PNG/JPG->WEBP. I've been working with Metalsmith for the past few months and it was working well (using imagemagick) but recently it's been utterly broken and I can't get it to work, so I'm looking for alternatives, Python-powered if possible.
16:54:38 <Aeyoun> SVG->PNG, are you crazy? Why? Every browser support SVG now. Have done so for years. Just embed the SVGs directly.
16:55:00 <guillom> I do embed the SVGs directly, but I still want the PNG to be available just in case.
16:55:20 <Aeyoun> guillom: check your server logs. only bots will be fetching those pngs.
16:55:57 <guillom> That's a side discussion :)
16:56:37 <Aeyoun> guillom: I have a script that takes jpeg/png sources and procuces multiple sizes at smaller resolutions in their origin format plus webp variants. Outputs html blocks I copy into Nikola.
16:56:41 <Aeyoun> Not nice, but it works.
16:57:03 * Aeyoun should really take a look at #2154 soon, but been really busy lately
16:57:14 <ChrisWarrick> you are not alone
16:58:14 <guillom> Don't take me wrong, I'm not criticizing. I'm very grateful for everything that developers in the free-software world do :)
16:59:07 <Aeyoun> guillom: you could contribute this feature to Nikola, you know. ;-)
17:00:47 <guillom> Aeyoun: When I'm more familiar with Python, yes, I could. But I'm just starting out in Python, so right now, I can't :) I can tinker here and there, but not write features yet.
17:01:03 <guillom> But I do appreciate the great documentation and great support here.
17:01:48 <Aeyoun> guillom: well, give it a go anyway? What is the worst thing that can happen? You try and you end up not creating a feature. Give yourself a challenge.
17:12:01 <guillom> True. I have a few "challenges" on my plate already, but I guess I could look into plugins and see where I go.
17:13:53 <ralsina> we could do multi-size thumbnails by changing exactly *one* function, guys by adding a for-loop ;-)
17:14:12 <ralsina> using them is of course a whole uglier beast
17:15:01 <Aeyoun> ralsina: yeah, that's what I’ve concluded as well
17:15:44 <Aeyoun> ralsina: also concluded that it should probably be a filter. so people insert images wherever they want in the size/aspect ratio they want, and the resize them and insert srcset as a filter
17:31:47 <ralsina> hmmmm filters can't create multiple files IIRC
17:31:57 <ralsina> because they don't add targets
17:32:08 <ralsina> maybe a taskmultiplier instead
17:48:47 * gour is finishing migration of OS back to Debian
23:34:15 <guillom> "Small codebase (programmers can understand all of Nikola core in a day)" < I won't claim I "understand all of Nikola core" but after browsing the code base a little, it's true that I'm really surprised by how understandable it is.
23:34:23 <guillom> \o/