Contributing: Generated Content

Generating Markdown

Occasionally you may want to generate markdown programmatically. For example, the supported PHP INI settings table is autogenerated.

  1. Define a BuildStep for the data you want to generate the markdown from. See PHPIniSupportInHHVMBuildStep for an example.

  2. Define a BuildStep that writes markdown to the guides-generated-markdown/ directory, defined here. See PHPIniSupportInHHVMMarkdownBuildStep for an example.

  3. Add a symlink (example) to the guide folder where you want to include this content.

  4. Use @@ syntax to include the generated file on the relevant page of your guide.

    @@ guides-generated-markdown/ @@
  5. Add a test (example).

API Example Code

Adding a .md file to the correct subdirectory in api-examples will cause the build script to add its content to the respective API page.

The .md file may contain any combination of explanatory text and any number of code examples following the same rules as above.

Was This Page Useful?
Thank You!
Thank You! If you'd like to share more feedback, please file an issue.