virtkick/http-master

non-config redirects, something like .htaccess but better

Opened this issue · 2 comments

How redirects are handled in http-master doesn't really fit how static websites that are served by the "static" module are developed. In my case, it's Middleman, but it's a case for any static site generator, be it Jekyll or wget -mnH. Redirects should be defined in the webapp itself, not in the config. How about introducing a plain text file somewhere in the project directory that will be magically handled by http-master? Example project:

/
  index.html
  css/
    style.css
  foo.redirect # Content: https://www.example.com/foo
  bar.html.redirect # Content: /

/foo redirects to https://www.example.com/foo
/bar.html redirects to / (scheme, host, port remain the same)

what does the -mnH option in wget actually do? I can't seem to find this anywhere.

@grex84 It will go thru the whole website and save it locally. Read my blogpost: https://www.nowaker.net/post/ruby-on-rails-a-static-site-generator.html