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

Add handler for static websites #142

Closed
Kaliumhexacyanoferrat opened this issue Nov 23, 2020 · 0 comments · Fixed by #168
Closed

Add handler for static websites #142

Kaliumhexacyanoferrat opened this issue Nov 23, 2020 · 0 comments · Fixed by #168
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@Kaliumhexacyanoferrat
Copy link
Owner

A a developer of a static website, I would like to use the GenHTTP framework to simply host my static content in a few lines of code.

Example

var website = StaticWebsite.From(ResourceTree.FromDirectory("./hugo/public/"));

Host.Create()
    .Handler(website)
    .Run();

Acceptance criteria

  • The functionality is implemented in a new module
  • The handler provides an index page for every folder where such an index file exists (e.g. "index.html"). Otherwise a HTTP 404 is returned
  • The handler serves a sitemap, if none does exist as a file
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat added enhancement New feature or request good first issue Good for newcomers labels Nov 23, 2020
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat added this to the Version 5.2 milestone Jan 8, 2021
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat self-assigned this Jan 8, 2021
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat linked a pull request Jan 8, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant