Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita43e6fe

Browse files
authored
Update getting_started.md
1 parent5b4569f commita43e6fe

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

‎docs/getting_started.md‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ description: "How to quickly start using Jinja2C++"
1010
##How to get Jinja2++
1111

1212
Get the latest Conan.io package:[
13-
jinja2cpp/0.9.1@Manu343726/testing](https://bintray.com/manu343726/conan-packages/jinja2cpp%3AManu343726/0.9.1%3Atesting)
13+
jinja2cpp/1.1.0](https://bintray.com/conan/conan-center/jinja2cpp%3A_/1.1.0%3A_)
1414

15-
Or download the latest release:[Release0.9.2](https://github.com/jinja2cpp/Jinja2Cpp/releases/latest)
15+
Or download the latest release:[Release1.1.0](https://github.com/jinja2cpp/Jinja2Cpp/releases/latest)
1616

1717
Or:
1818
- Clone the Jinja2C++[repository](https://github.com/jinja2cpp/Jinja2Cpp)
@@ -46,3 +46,24 @@ Hello World!!!
4646
`
4747

4848
That's all!
49+
50+
Full-featured trivial sample source:
51+
```c++
52+
#include<jinja2cpp/template.h>
53+
#include<iostream>
54+
55+
intmain()
56+
{
57+
std::string source = R"(
58+
{{ ("Hello", 'world') | join }}!!!
59+
{{ ("Hello", 'world') | join(', ') }}!!!
60+
{{ ("Hello", 'world') | join(d = '; ') }}!!!
61+
{{ ("Hello", 'world') | join(d = '; ') | lower }}!!!)";
62+
63+
jinja2::Template tpl;
64+
tpl.Load(source);
65+
66+
std::string result = tpl.RenderAsString(jinja2::ValuesMap()).value();
67+
std::cout << result << "\n";
68+
}
69+
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp