-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
overview: simplify per-project display #604
base: main
Are you sure you want to change the base?
Conversation
2183987
to
6abb3f2
Compare
this also fixes local deployment by using relative links
6abb3f2
to
1511795
Compare
@@ -262,7 +262,7 @@ let | |||
--from=markdown+raw_html \ | |||
--to=html \ | |||
--standalone \ | |||
--css="/style.css" \ | |||
--css="./style.css" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks css for project URLs: http://localhost:8080/project/Nitrokey-3.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh... this needs more thought. But absolute URLs bad because you can't use the styles locally without web server shenanigans as it will think it's file:///style.css
rather than the store path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd advise against opening stuff as file://
in general. It breaks stuff in weird ways and doesn't even behave the same way across browsers. Instead we should put a simple web server into shell.nix, something like darkttpd
that works out of the box with no config required.
@@ -237,9 +237,9 @@ let | |||
} | |||
// mapAttrs' ( | |||
name: project: | |||
nameValuePair "project/${name}/index.html" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like these kind of URLs. They are longer and they contain the html
bit which is an implementation detail imo and should be hidden from the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hiding can be done at the web server side with rewrites. The document structure is independent of that and should be explicit at the file system level. The extra nesting has no meaning in our document structure and thus shouldn't exist.
There's more to say about this if you want to dig deeper, but let's not do that here. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why put the complexity into the config, where both devs and the deployment need to do their own considerations for this to work? Showing index.html
as the default page for a directory is a very common default.
No description provided.