Changed the examples pattern to a better one with indexation, better ordered menus

toml-checker
Luiz "darknessxk" Felipe 4 years ago committed by Duncan Ogilvie
parent 9a008f0e40
commit 7dfa905625

@ -2,6 +2,7 @@
layout: page
title: Building
permalink: /building/
nav_order: 1
---
# Building

@ -1,63 +0,0 @@
---
layout: page
title: Examples
permalink: /examples/
---
# Examples
## Quickstart
Smallest possible start point you can have using cmkr
```toml
[cmake]
version = "3.15"
[project]
name = "hello-world"
[target.hello-world]
type = "executable"
sources = [ "src/*.cpp" ]
```
## Changing C++/C version
Simple example changing C++ to version 20 and C standard to the version 11
```toml
[target.example]
type = "executable"
compile-features = [ "cxx_std_20", "c_std_11" ]
```
## Import from another Git repository
Importing an existing project called Zydis to my project
tag is optional but you can target any branch with it
```toml
[fetch-content]
zydis = { git = "https://github.com/zyantific/zydis.git", tag = "v3.1.0" }
[target.example]
type = "executable"
link-libraries = ["zydis"]
```
## Import from another folder
Importing an existing project called Zydis to my project
tag is optional but you can target any branch with it
```toml
[fetch-content]
zydis = { git = "https://github.com/zyantific/zydis.git", tag = "v3.1.0" }
[target.example]
type = "executable"
link-libraries = ["zydis"]
```

@ -0,0 +1,17 @@
---
layout: page
title: Changing C/C++ version
permalink: /examples/quickstart
parent: Examples
nav_order: 1
---
# Changing C/C++ version
Simple example changing C++ to version 20 and C standard to the version 11
```toml
[target.example]
type = "executable"
compile-features = [ "cxx_std_20", "c_std_11" ]
```

@ -0,0 +1,20 @@
---
layout: page
title: Import content from existing folders
permalink: /examples/quickstart
parent: Examples
nav_order: 4
---
# Import content from existing folders
Importing one project by targeting the folder path
```toml
[fetch-content]
zydis = { git = "https://github.com/zyantific/zydis.git", tag = "v3.1.0" }
[target.example]
type = "executable"
link-libraries = ["zydis"]
```

@ -0,0 +1,22 @@
---
layout: page
title: Import content from Github
permalink: /examples/quickstart
parent: Examples
nav_order: 2
---
# Import content from Github
Importing an existing project called Zydis to my project
tag is optional but you can target any branch with it
```toml
[fetch-content]
zydis = { git = "https://github.com/zyantific/zydis.git", tag = "v3.1.0" }
[target.example]
type = "executable"
link-libraries = ["zydis"]
```

@ -0,0 +1,10 @@
---
layout: page
title: Examples
permalink: /examples/
nav_order: 4
has_children: true
---
# Examples

@ -0,0 +1,23 @@
---
layout: page
title: Quickstart
permalink: /examples/quickstart
parent: Examples
nav_order: 0
---
# Quickstart
Smallest possible start point you can have using cmkr
```toml
[cmake]
version = "3.15"
[project]
name = "hello-world"
[target.hello-world]
type = "executable"
sources = [ "src/*.cpp" ]
```

@ -2,6 +2,7 @@
layout: page
title: Usage
permalink: /usage/
nav_order: 2
---
# Usage

Loading…
Cancel
Save