Giter Club home page Giter Club logo

phptohtmlstaticcompiler's Introduction

PHP to HTML Static Compiler

A really simple script to compile PHP files to static HTML (using a beautifier). Convenient when you want to use things like partials but your clients want static HTML files.

This was just a simple script I wrote for the purpose mentioned above. If you have any questions, or concerns feel free to contact me or create an issue.

If your HTML requires assets such as CSS/JS/etc and you use a different compiled directory, I recommend creating a symbolic link to the original directory.

Usage

Simply follow/edit the settings within the generate_output_html_files.php script, and then run the following command via terminal:

php generate_output_html_files.php

Beautifying

You can turn on/off beautifying using the option at the top of the file. The Beautifying feature leverages IvanWeller's PHP script at the following repo:

https://github.com/ivanweiler/beautify-html/

UTF Quote Fixes

There is a feature to help with quotes being turned into "“", or other invalid characters. You can turn this on by using the $shouldFixUTFQuotes boolean.

Why didn't you use composer?

I really just wanted a simple script I could drop into any project, and go without any setup required (even though I know Composer is super simple). As such, I decided to leave composer out of this project. By all means, feel free to repurpose this project to include composer if you see the need.

phptohtmlstaticcompiler's People

Contributors

mpge avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.