Skip to content
Documentation for those that use HHVM and write Hack and PHP code for HHVM. http://twitter.com/HHVMDocCommits
Branch: master
Clone or download
kunigami and fredemmott update build instructions (#631)
* update build instructions

* update docblock parsing line
Latest commit b9f3003 Apr 29, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api-examples hhast-migrate fixes for 4.1 Apr 16, 2019
api-sources update submodules Apr 16, 2019
bin Remove need for autoloader updates between build steps Apr 18, 2019
build/final/codegen Keep the build/final/codegen directory around so autoloader doesnt fail Apr 19, 2019
container-bin Run build before typechecker Apr 16, 2019
guides Update 57-as.md Apr 24, 2019
public X_FORWARDED_PROTO takes precedence over HTTPS var Mar 15, 2019
sass Fix unwanted scrollbar on forward/back footer links Mar 12, 2019
src remove unused use statements Apr 23, 2019
tests Don't set --vendor twice Apr 18, 2019
.dockerignore Rework docker image building Dec 16, 2015
.ebignore Remove legacy markdown pipeline Dec 28, 2017
.gitignore ignore .hack.out and .hack.diff files Apr 19, 2019
.gitmodules point HHVM submodule at 3.23 branch Nov 28, 2017
.hhconfig Use hack-http-request-response-interfaces and usox/hackttp Dec 14, 2018
.travis.sh Reduce memoruy limit in containers by using hh_server --check instead… Apr 19, 2019
.travis.yml add subprocess reaping etc Apr 19, 2019
CODE_OF_CONDUCT.md OSS Automated Fix: Addition of Code of Conduct (#621) Mar 28, 2019
CONTRIBUTING.md remove `hhvm ` from various example command lines Apr 16, 2019
Dockerfile back to latest on dockerfile Aug 31, 2018
Dockerrun.aws.json [autocommit] AWS deploy 2019-03-28-ad1b205f Mar 28, 2019
Gemfile update ruby dependencies Dec 28, 2017
Gemfile.lock update ruby dependencies Dec 28, 2017
LICENSE Change license date Jul 27, 2015
LocalConfig.php Split out HSL from /hack/ to /hsl/ Nov 22, 2017
PATENTS Add PATENTS file Jul 7, 2017
README.md update build instructions (#631) Apr 29, 2019
admin-deploy.md Update URL and text to reflect the current AWS UI Dec 18, 2018
building-site-details.md Make the README less verbose. Simpler build instructions. Dec 4, 2015
composer.json update dependencies Mar 7, 2019
composer.lock hhast-migrate fixes for 4.1 Apr 16, 2019
hh_autoload.json Keep the build/final/codegen directory around so autoloader doesnt fail Apr 19, 2019
hhast-lint.json add linter Dec 10, 2017
hhvm.dev.ini Specify worker counts Jan 16, 2019
hhvm.prod.ini Specify worker counts Jan 16, 2019
installation-detailed.md Require hhvm checkout to be in parent directory, remove need for conf… Oct 20, 2017
legacy-docs-site-index.json Support API reference URLs from the old site Nov 18, 2015

README.md

HHVM and Hack User Documentation Build Status

This is the repo for the HHVM and Hack user documentation. Contributions and feedback are welcome.

If you see anything egregious, you can file an issue or ping us at #hhvm-dev on Freenode IRC or hhvm.dev on Facebook

What?

There are three keys areas to this repo:

  • User Documentation: The guides. We realized that finding out how to do simple things like setting up HHVM to more complicated things like using async were more tedious than they should be. The documentation should be a friend, not a nuisance.
  • API Reference: We use our own HHVM code documentation for Hack and HHVM specific API documentation. And for anything PHP specific, we defer to php.net. This serves two purposes:
    • The HHVM source code is the source of truth
    • We don't duplicate PHP documentation, and their documentation will serve as the source of truth for PHP-specific documentation
  • Infrastructure: An easier, more modular and scalable way for documentation. Markdown, not docbook, for user-guide content. Easy to follow, Hack-based source code for building the site.

How?

Our strategy to create better documentation begins with a re-thinking of our doc infrastructure.

  • Markdown instead of docbook provides an easier path for documentation source readability and updates.
    • Have extensions to support things like example insertion, etc.
  • Token scan our the HHVM code block documentation (instead of reflection) so that rebuilding HHVM isn't necessary to update the documentation.
  • Ensure the source code that builds the site is as reusable as possible, so that it has the potential to provide reusability to documentation projects beyond Hack and HHVM.

Check out the source code for building the site. bin/build.php is where all the execution begins.

Running A Local Copy

If you just want to quickly run a copy and don't plan on contributing changes:

  1. Install Docker
  2. docker run -p 8080:80 -d hhvm/user-documentation; this will output a container ID
  3. You can then access a local copy of the documentation at http://localhost:8080
  4. To stop the instance, run docker stop ID_FROM_STEP_2_ABOVE. If you don't have a copy of that ID any more, run docker ps and use the container name in the right-most column instead.

Building The Site

If you would like to build the site locally (e.g., to test your content contributions), you will need to install and configure your system to be able to build and run the site locally.

These are the basic step-by-step instructions to get you up and running. It assumes certain packages are installed on your system. Click here for detailed installation information.

  1. Clone this repository
  2. cd path/to/user-documentation
  3. git submodule update --init
  4. php /path/to/composer.phar install # Make sure you have composer downloaded
  5. sudo gem install bundler # to get Ruby bundles
  6. bundle --path vendor-rb/ # install required ruby bundles
  7. hhvm bin/build.php # build the site!

Follow the next steps to access this build from a browser.

Running The Site From A Checkout

Configure a webserver and HHVM to serve the public/ directory, with all requests that don't match a file being served by index.php. For local development, HHVM's built-in webserver should be sufficient:

$ cd public
$ hhvm -m server -p 8080 -c ../hhvm.dev.ini

Then, in your browser, go to http://localhost:8080

You can’t perform that action at this time.