';\n $html .= '

    ' . ucfirst($title) . '<\/h1>';\n $html .= '
    ' . nl2br(htmlspecialchars($content)) . '<\/div>';\n $html .= '<\/body><\/html>';\n\n file_put_contents($outputDir . $title . '.html', $html);\n}\n\necho \"Site generated to \/dist\\n\";<\/pre>

    Run it from the command line:<\/p>

    php build.php<\/pre>

    Now you have static HTML files ready for deployment.<\/p>\n


    \n

    Tools and Frameworks That Help<\/h3>\n

    While you can roll your own, several PHP tools simplify static generation:<\/p>\n