Contributing: Generated Content
Generating Markdown
Occasionally you may want to generate markdown programmatically. For example, the supported PHP INI settings table is autogenerated.
-
Define a
BuildStep
for the data you want to generate the markdown from. See PHPIniSupportInHHVMBuildStep for an example. -
Define a
BuildStep
that writes markdown to the guides-generated-markdown/ directory, defined here. See PHPIniSupportInHHVMMarkdownBuildStep for an example. -
Add a symlink (example) to the guide folder where you want to include this content.
-
Use
@@
syntax to include the generated file on the relevant page of your guide.@@ guides-generated-markdown/your_generated_file.md @@
-
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.