Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fricklerhandwerk
Copy link
Contributor

No description provided.

@fricklerhandwerk fricklerhandwerk force-pushed the overview-links branch 2 times, most recently from 2183987 to 6abb3f2 Compare March 14, 2025 10:59
this also fixes local deployment by using relative links
@@ -262,7 +262,7 @@ let
--from=markdown+raw_html \
--to=html \
--standalone \
--css="/style.css" \
--css="./style.css" \
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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" {
Copy link
Contributor

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.

Copy link
Contributor Author

@fricklerhandwerk fricklerhandwerk Mar 22, 2025

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. ;)

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants