GithubHelp home page GithubHelp logo

/multipage/ .htaccess about html-build HOT 10 CLOSED

whatwg avatar whatwg commented on June 15, 2024
/multipage/ .htaccess

from html-build.

Comments (10)

domenic avatar domenic commented on June 15, 2024

This seems like a "good first bug" for you or @foolip to do in order to make sure I'm not the only one who understands how the build system works :)

from html-build.

annevk avatar annevk commented on June 15, 2024

I'm happy to change this somehow. Should we just kill it in favor of having a single .htaccess in the root? And merge all the rules into whatwg/html?

from html-build.

domenic avatar domenic commented on June 15, 2024

I don't think we can do that for the 404. But all the filetype rules should be merged, and then, hmm... We could either:

  • Add a .multipage-htaccess that gets copied over, similar to .multipage-404
  • Change the setup so that:
    • whatwg/html has a multipage directory containing .htaccess and 404.html
    • the build script copies .wattsi-output/multipage-html into multipage/, instead of the current setup which assembles .wattsi-output/multipage-html and then moves it to multipage/.

from html-build.

domenic avatar domenic commented on June 15, 2024

Maybe we can do that for the 404 actually, we just need to learn how to scope .htaccess rules to one subdirectory.

from html-build.

foolip avatar foolip commented on June 15, 2024

OK, so here's what the generated /mutlipage/.htaccess looks like:

ErrorDocument 404 /multipage/404.html
<files *.txt>
 ForceType text/plain
</files>
<files *.js>
 ForceType text/javascript
</files>
<files *.css>
 ForceType text/css
</files>
<files *.html>
 ForceType text/html
</files>

Comparing that to https://github.com/whatwg/html/blob/master/.htaccess I take it the solution here is to eliminate duplication and move as much as possible to the top-level .htaccess?

As for the 404, can't we use the same 404 for everything?

from html-build.

foolip avatar foolip commented on June 15, 2024

https://html.spec.whatwg.org/not-here says "Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request." so that's a problem...

from html-build.

annevk avatar annevk commented on June 15, 2024

If we did the script might need adjustments too. That would make building potentially simpler though since you could just keeping throwing away /multipage/ as is happening now.

from html-build.

domenic avatar domenic commented on June 15, 2024

As for the 404, can't we use the same 404 for everything?

I don't think so. The multipage 404 is specifically designed to be a redirect, by including fragment-links.js and some multipage-specific text. See whatwg/html#79.

But yes, I agree with moving as much as possible to the top level.

from html-build.

annevk avatar annevk commented on June 15, 2024

I think the 404 is actually generic enough and you only get the redirect if the URL ends in a fragment that is understood by the script. Not needing either the 404 or the .htaccess in /multipage/ would reduce some complexity so I think we should just go for that. The only thing we need to change is the URL pointing to the script and the URL pointing to the /multipage/ contents.

I will work on some patches unless I hear otherwise.

from html-build.

annevk avatar annevk commented on June 15, 2024

Fixed through #18 and whatwg/html#107.

from html-build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.