I would like to put some additional code examples (PHP Code of how to use our API) in the API Blueprint Specification on Apiary.io.
Standard code highlighting like that works
my code
PHP code syntax highlighting doesn't work, it looks like standard code highlighting:
```
php
$private_key = file_get_contents('id_rsa');
$client_id = 'https://www.my-client-app.com';
$user_id = '[email protected]';
$grant_type = 'urn:ietf:params:oauth:grant-type:jwt-bearer';
$jwt = generate
``````
I read that e.g. Atlassian is using CodeMirror for their syntax highlighting. Eventually this would also be possible for apiary.io (it has a MIT License)
another idea would be to use highlight.js, which supports PHP and HTTP syntax highlighting and a bunch of other languages.
Any news on this?
+1
This would be really great for us, too.
Github does this the best and supports the most languages, as far as I can tell (I am especially happy when elixir-lang is properly highlighted).
https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
Hi, please check out the announcement about our brand new API Documentation https://blog.apiary.io/ApiaryUI. We've introduced syntax highlighting, it doesn't yet support all languages (you can see a list of supported languages in the announcement).
Here's how it looks:
import requests
requests.get('https://api.example.com')
If you have any further feature requests or bug reports that are specific to Apiary rendered documentation please reach out to Apiary support. This repository and issue tracker is tracking the API Blueprint specification. If you have some requests for supported languages be sure to reach out to Apiary support so that we can priotitise them accordingly.
Most helpful comment
Any news on this?