Skip to content

Commit 72b3e8d

Browse files
authored
Godbolt usage added into README
1 parent 8f44017 commit 72b3e8d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ blog/2000-10-30-my-blog-example/
2626

2727
3. Add your full Markdown blog post content inside the `index.md` file.
2828

29+
* [optional] Add Godbolt links or generate from C++ codeblock:
30+
* If your content includes Godbolt link(s), simply use the `<Godbolt url="YOUR_GODBOLT_URL"/>` syntax to generate `Try it on Compiler Explorer 🚀` link(s).
31+
* If your content includes C++ codeblock, you need to include a custom metadata to the codeblock like below:
32+
```
33+
``` cpp { "compilers": ["clang_trunk -std=c++26", "gsnapshot -std=c++26"], "libs": ["beman_optional@trunk"], "filters": {"execute":true} }
34+
// your cpp code
35+
```
36+
<details>
37+
<summary> Metadata reference </summary>
38+
39+
The metadata json object is based on the [Compiler Explorer API](https://github.com/compiler-explorer/compiler-explorer/blob/main/docs/API.md) with custom flavor for easier to write. This metadata json structure is basically `{"compilers": ["CompilerName CompilerFlags"], "libs": ["LibraryId@Version"], "filters": {"execute":true}}`
40+
* The `CompilerName`s you can get from: https://godbolt.org/api/compilers
41+
* The `LibraryId`s you can get from: https://godbolt.org/api/libraries/c++
42+
43+
</details>
44+
45+
2946
Example
3047
```shell
3148
$ cat blog/2000-10-30-my-blog-example/index.md
@@ -66,7 +83,6 @@ socials: # [optional] Include your socials (like your Github, X, Linkedin
6683

6784
> Note: The Discourse comments plugin only works for production website (a.k.a. https://bemanproject.org/). You cannot test it locally or on preview deployments. Check [Integrate Discourse comment feature for blog posts](https://github.com/bemanproject/website/issues/25) for more details.
6885
69-
7086
4. Open a `DRAFT PR` and `wait` up to one minute for a preview deployment of your blog post.
7187

7288
* Draft PR example: [Add blog post: My Blog Example #54](https://github.com/bemanproject/website/pull/54/).

docs/libs/beman.optional/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This repository implements `std::optional` extensions targeting C++26. The `bema
1212

1313
**Implements**: [Give *std::optional* Range Support (P3168R2)](https://wg21.link/P3168R2) and [`std::optional<T&>` (P2988R5)](https://wg21.link/P2988R5)
1414

15-
**Status**: [Production ready. API may undergo changes.](../../BEMAN_LIBRARY_MATURITY_MODEL.md#production-ready-api-may-undergo-changes)
15+
**Status**: [Production ready. API may undergo changes.](../../beman_library_maturity_model.md#production-ready-api-may-undergo-changes)
1616

1717
## License
1818

0 commit comments

Comments
 (0)