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 staticHtmlAdapter #66

Open
helmo opened this issue Jul 9, 2020 · 5 comments
Open

Add staticHtmlAdapter #66

helmo opened this issue Jul 9, 2020 · 5 comments

Comments

@helmo
Copy link
Contributor

helmo commented Jul 9, 2020

Would it be easy to detect a static only site?

The current adapters all look for a pattern to be present in either file name or content, but for this we'd have to check the absence of other things.

E.g. a single html file in a subfolder of a wordpress site should not be detected here.
The presences of index.html is a good indication, but to be useful I'd want be sure no other php files are present (e.g. a contact.php file for some form processing). And the html files should not contain inline <?php ?> shippits.

Or we'd have to also create a GenericPhpAdapter that acts as a fallthrough for when we have *.php files but no cms is detected.

I've been drafting a bit of this in a feature/statichtml branch

@SniperSister
Copy link
Member

@helmo can you explain what the potential usecase of such a detection would be?

@helmo
Copy link
Contributor Author

helmo commented Jul 10, 2020

I'm using this in my vhost list page.

A site that is 'static only' is not affected by a change in php version. That extra info can help when upgrading a server of planning which sites to migrate.
But a site that is mostly static ( so no CMS detected) but does have a single contact.php file does require extra testing.

@SniperSister
Copy link
Member

I see your point, however I'm unsure if that should be really part of this tool or if it's "out of scope" as it's pretty much the opposite of the initial goal of this tool.

@zero-24 what do you think?

@zero-24
Copy link
Member

zero-24 commented Jul 10, 2020

Hmm i have to agree with @SniperSister here. That non detected sites does not have to be a static html site and I‘m not sure whether we should try to detect such maybe custom build sites.

@helmo
Copy link
Contributor Author

helmo commented Jul 10, 2020

For a site to be detected as static html it would require an index.html or index.htm

That branch also contains a draft PlaceholderPageAdapter.php that currently detects my own placeholder page and the default one from ISPconfig

But fair enough, it's good to stay in scope :)

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

No branches or pull requests

3 participants