overview: Stable project urls#570
Conversation
| projects: | ||
| concatLines ( | ||
| mapAttrsToList (name: _: '' | ||
| <a href="${name}">${name}</a> |
There was a problem hiding this comment.
| <a href="${name}">${name}</a> | |
| <a href="project/${name}">${name}</a> |
The issue discussed namespacing for better extensibility, and I agree with that.
There was a problem hiding this comment.
Yeah agree, going for extensibility would be the safer bet here.
|
Well done! This works great when using a HTTP server and it looks and behaves just as expected: That said, this isn't the case when opening the overview file directly:
Then I'd have to click on
|
| projects: | ||
| concatLines ( | ||
| mapAttrsToList (name: _: '' | ||
| <a href="${name}">${name}</a> |
There was a problem hiding this comment.
We can make the page link take us directly to the project page (see #570 (comment)):
| <a href="${name}">${name}</a> | |
| <a href="${name}/index.html">${name}</a> |
There was a problem hiding this comment.
Thanks, I'll respond to your review here. Opening the pages as file:// in the browser doesn't work and I think it's reasonable to require contributors to use some kind of minimal webserver (e.g. I use darkhttpd). Opening as file:// also brings the disadvantage of not allowing AJAX and even is inconsistently implemented in different browsers.
On a different note, I'd rather not have index.html fragments in URLS. These are implementation details and shouldn't be visible to the user (and they make the URL longer).
There was a problem hiding this comment.
Alright, that seems reasonable to me. Then what do you think about adding another package that runs a HTTP server on the overview? Something like overview-preview that users can run to see how it would look in production.
We could alternatively rename overview to overview-static and have overview be the package that starts the server.
There was a problem hiding this comment.
Mh how about we just add darkhttpd to devShells.default and document how to build the overview and run the server?
There was a problem hiding this comment.
Sure, would that be better for reloading changes faster?


Closes #505
Beware that this currently mixes the names of
projects/andprojects-old/, even though the names inprojects-old/are actually grant names, which we don't want to use. As NGIpkgs is experimental and the overview isn't even hosted in it's designated place yet, I didn't care yet to write logic to only use names fromprojects/.Currently this uses the following URL format for the URL of e.g. the Canaille project:
https://ngi.nixos.org/Canaille