Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Hotfix/docs getting started #631

Merged
merged 3 commits into from Aug 20, 2018
Merged

Hotfix/docs getting started #631

merged 3 commits into from Aug 20, 2018

Conversation

geerteltink
Copy link
Member

Provide a narrative description of what you are trying to accomplish:

During the conversion of v2 to v3 docs the quick start text for creating a hello template was changed in such way that it unclear what code to use for which renderer. This PR adds example code for plates, zend-view and twig.

  • Is this related to documentation?

```php
<h1>Hello <?= $this->target ?></h1>
```
```html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP was correct, because the interesting part of this code sample is PHP and not HTML.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to php but that doesn't seem to render nice when previewing the markdown file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the target is mkdocs, so not really an issue. :)


```php
<h1>Hello <?= $this->target ?></h1>
```
// plates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, a misunderstanding. The code example is HTML and PHP (PHTML), but the relevant part is PHP. Therefore we use "php" in the documentation for this kind of code examples. It would be better if we can use "php+html", but I don't know if this work.

So please revert to HTML comment syntax.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted back to html.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xtreamwayz
I found this:

There has to be at least one tag in the source code, for Prism to detect if it is a HTML page with PHP tags included or simple plain PHP code.

PrismJS/prism#1238 (comment)

@weierophinney weierophinney merged commit 7d9079a into zendframework:master Aug 20, 2018
weierophinney added a commit that referenced this pull request Aug 20, 2018
weierophinney added a commit that referenced this pull request Aug 20, 2018
@weierophinney
Copy link
Member

Thanks, @xtreamwayz!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants