StaticPHP Docs

Markdown Files

StaticPHP has support for Markdown files. It will treat a file as markdown if it has the .md file extension.

You may want to use Markdown when you are writing an article of some sort where you only require simple text formatting without having to worry about HTML or PHP.

Examples of Supported Markdown

The most used Markdown features should be supported, but if you have any specific needs, you may need to wait for this to be added in the future.

Paragraphs and Text

Simple lines of text forming sentenses or paragraphs can be written on their own. Linebreaks are supported too.


The quick brown fox jumped over the lazy dog.

The quick brown fox
jumped over the lazy dog.

Back to Supported Markdown

Headings

StaticPHP supports all six headings in Markdown.


# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

Every heading is an anchor and can be used to create hyperlinks to those headings.

Back to Supported Markdown

Inline Text Formatting

You can format your text as bold, italic, and strikethrough.


**bold** or __bold__
*italic* or _italic_
~~strikethrough~~

Back to Supported Markdown

Linking to other resources can be done too.


[Link Text](http://hostname.tld/resource)

You can also add a title to the hyperlink.


[Link Text](http://hostname.tld/resource "Title Text")

Create a link to a heading anchor.


[Hyperlinks](#hyperlinks)

### Hyperlinks

You can also use the Special MetaData key of link_fragment_prefix to define a prefix for fragment/anchor links. More about this on the MetaData page.

Back to Supported Markdown

Images

Adding images is very similar to hyperlinks.


![Alt Text](http://hostname.tld/image.png)

With a title.


![Alt Text](http://hostname.tld/image.png "Title Text")

Back to Supported Markdown

Code and Code Blocks

You can write lines of code inline by surrounding the content with single backticks. `

And you can write multiline codeblocks using three backticks on the start and end lines. You can optionally supply a name after the opening backticks.

Back to Supported Markdown

Unordered Lists

You can write unordered lists by putting each list item on its own line, with each item starting with a hyphen.


- Item 1
- Item 2
- Another List Item
- Yet Another List Item

Back to Supported Markdown

MetaData Support

StaticPHP has MetaData support for Markdown files. Refer to the MetaData documentation for more.

Functional Blocks Support

There is currently no functional blocks support for Markdown files. This is planned and will likely be added in the future.

Functional blocks can still be used with other files. Refer to the Functional Blocks documentation for more.