From e270a67a5fc8c05ad9115f32b7c1257cdb7a19a3 Mon Sep 17 00:00:00 2001 From: Andrii Afanasiev Date: Thu, 19 Oct 2017 09:48:02 +0200 Subject: [PATCH] update: readme --- README.md | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1f16fb9..8e00fb6 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,46 @@ Dou to bad sync with composer there are some steps 4. Enable extension with name ```PHPBB Code Highlight``` 5. [Optional] Navigate to the ACP ```Extensions -> PPHPBB Code Highlight -> Settings``` and setup list of languages and theme. +###### NOTE +Enabling of all languages will cause performance issues on clients side, because each langauge is loading as separate JS. +So, if You are still needed to have all languages, then it will be nice to have: +1. HTTP2 on server +2. Static-Domain +3. CDN + +## How to use in posts +To highlight code in post use new PHPBB tag [syntax]: +```ini +[syntax=cpp] +#include + +std::tuple foo() +{ + return std::make_tuple(128, true, 1.5f); +} + +int main() +{ + std::tuple result = foo(); + int value = std::get<0>(result); + int obj1; + bool obj2; + float obj3; + std::tie(obj1, obj2, obj3) = foo(); +} +[/syntax] +``` + ## Links - [PHPBB Dev Docs](https://area51.phpbb.com/docs/dev/) - [HighlightJS](https://highlightjs.org/) - [Currently Used Here](https://forum.cryengine.com/) - [PHPBB Events list](https://wiki.phpbb.com/Event_List) -## Help needed -1. Advise how to proper store dependency from [HighlightJS repo](https://github.com/isagalaev/highlight.js) -2. Advise how to wrap PHPBB extension with composer +## TODO +1. Proper store dependency from [HighlightJS repo](https://github.com/isagalaev/highlight.js) +2. Wrap PHPBB extension with composer +3. Write tests ## Thank You Big thanks for community