Skip to content

Commit 1ce3bca

Browse files
authored
Merge pull request #45 from bemanproject/add-docs-for-blog-posts
Add initial docs for blog posts
2 parents a3509b9 + e929d70 commit 1ce3bca

File tree

10 files changed

+153
-29
lines changed

10 files changed

+153
-29
lines changed

README.md

Lines changed: 130 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,137 @@ This is the repository hosting the code for the future Beman Website.
44

55
We aim to replace the content from the [existing Beman website](https://www.bemanproject.org) by deploying the website generated from current repository.
66

7-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
7+
<!-- TODO: Remove this after the website deployment switch. -->
8+
> Note: https://bemanproject.github.io/website/ is used a temporary domain while we boostrap the new website infrastructure.
9+
10+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
811
Documentation is written in MDX format.
912
Building and deploying it requires Node and NPM.
1013

14+
## Add a blog post
15+
16+
1. Repository setup: `create a local clone` or `open in Codespaces`.
17+
18+
2. Create a directory having an `index.md` file using this pattern: `blog/YYYY-MM-DD-tile-of-post/index.md`:
19+
20+
Example:
21+
22+
```shell
23+
$ tree blog/2000-10-30-my-blog-example/
24+
blog/2000-10-30-my-blog-example/
25+
├── images
26+
│   └── beman_logo.png # images are stored in ./images/
27+
└── index.md # actual blog post content
28+
29+
2 directories, 2 files
30+
```
31+
32+
3. Add your full Markdown blog post content inside the `index.md` file.
33+
34+
Example
35+
```shell
36+
$ cat blog/2000-10-30-my-blog-example/index.md
37+
---
38+
slug: my-blog-example-slug # Slug example. Remove this comment if using this template.
39+
authors: [neatudarius] # Authors list with entrie from blog/authors.yml. Remove this comment if using this template.
40+
tags: ["cpp26", "beman-docs"] # Blog post valid tags from blog/tags.yml. Remove this comment if using this template.
41+
---
42+
43+
# My Blog Example
44+
45+
This is my blog example.
46+
47+
Here I can write Markdown content.
48+
[...]
49+
```
50+
51+
<details>
52+
<summary> Add the author if not already present in blog/authors.yml </summary>
53+
54+
If this is your first time writing a blog post, you have to add yourself as an author in the `blog/authors.yml` file. Add a new entry using the following format:
55+
56+
```shell
57+
<AuthorTag>: # Your author tag, this is what you will use in the header section for a log.
58+
name: # Your Real Name.
59+
title: # Your title, how do you want to be recognized by other people.
60+
url: # Your Github profile page
61+
image_url: # A url for your profile image (for Github profile image: go to your profile, click on your image and open it in a new tab, copy the link).
62+
page: true # If an author page should be generated for you.
63+
socials: # [optional] Include your socials (like your Github, X, Linkedin etc)
64+
github: <yourId> # [optional] Add GitHub page.
65+
linkedin: <yourId> # [optional] Add LinkedIn page.
66+
x: <yourId> # [optional] Add X page.
67+
```
68+
69+
</details>
70+
71+
72+
4. Open a `DRAFT PR` and `wait` up to one minute for a preview deployment of your blog post.
73+
74+
* Draft PR example: [Add blog post: My Blog Example #54](https://github.com/bemanproject/website/pull/54/).
75+
76+
* Click on the `Deploy Preview` URL (format `https://deploy-preview-${PR NUMBER}--bemanproject.netlify.app/`).
77+
78+
* Successful CI preview deployment example:
79+
80+
![CI preview deployment success message](./images/tutorial/add-a-blog/ci-preview-deployment-success-message.gif)
81+
82+
* Test your deployment.
83+
84+
<details>
85+
<summary> [DEBUG] Inspect CI preview deployment error logs. </summary>
86+
87+
The CI preview deployment logs should be public. Please ping a codeowner otherwise.
88+
89+
* `DRAFT` PR example with CI preview deployment error - [#49](https://github.com/bemanproject/website/pull/49).
90+
91+
* Click on the `Latest deploy log` URL - e.g., https://app.netlify.com/sites/bemanproject/deploys/6809108974fd910008633aa9.
92+
93+
* Logs inspect example:
94+
95+
![](./images/tutorial/add-a-blog/ci-preview-deployment-failure-message.gif)
96+
97+
* Fix the error, commit and push the changes. Wait for new deployment.
98+
99+
> If you need to browse through more recent CI preview deployments logs use https://app.netlify.com/sites/bemanproject/deploys/. Note: netlify provides a single a single CI preview deployment for each PR - latest commit, but stores logs for multiple ones.
100+
101+
</details>
102+
103+
<details>
104+
<summary> [DEBUG] Inspect local deployment error logs. </summary>
105+
106+
* On local setup, run `make` (see [Local development](#local-development)) and check if there is any error in the console - example:
107+
108+
```shell
109+
$ make
110+
...
111+
[INFO] Starting the development server...
112+
...
113+
[ERROR] Error: Processing of blog source file path=2000-10-30-my-blog-example/index.md failed.
114+
at doProcessBlogSourceFile (/Users/dariusn/dev/dn/git/Beman/website/node_modules/@docusaurus/plugin-content-blog/lib/blogUtils.js:268:19)
115+
at async Promise.all (index 0)
116+
... 10 lines matching cause stack trace ...
117+
at async file:///Users/dariusn/dev/dn/git/Beman/website/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3 {
118+
[cause]: Error: Blog author with key "neatudarius" not found in the authors map file.
119+
Valid author keys are:
120+
- JeffGarland
121+
- dabrahams
122+
- DavidSankel
123+
```
124+
125+
* Fix the error, re-deploy the local website.
126+
127+
* Commit and push the changes. Wait for a new CI preview deployment.
128+
129+
</details>
130+
131+
5. After you got `a succesful CI preview deployment`, update the PR to be ready for review and add [@leads](https://github.com/orgs/bemanproject/teams/leads) /[@core-reviewers](https://github.com/orgs/bemanproject/teams/core-reviewers).
132+
133+
6. Apply the review feedback. Get approval. Merge the PR.
134+
135+
<!-- TODO: Replace with https://www.bemanproject.org/ after the website deployment switch. -->
136+
7. The updates are automatically deployed to the production website after a few minutes - check https://bemanproject.github.io/website/.
137+
11138
## Local development
12139
13140
### Install dependencies
@@ -71,7 +198,7 @@ $ npm install -g yarn
71198
72199
</details>
73200
74-
## Start local sever
201+
### Start local sever
75202
76203
To start a local development server, run:
77204
@@ -84,14 +211,10 @@ If everything is properly installed, the command should open a browser window o
84211
Most changes are reflected live without having to restart the server.
85212
86213
87-
## Generate static content for GitHub Pages deployment
214+
### Generate static content for GitHub Pages deployment
88215
89216
To generate static from the project that can be served using any static contents hosting service (like `gh-pages`).
90217
91218
```shell
92219
$ make build
93220
```
94-
95-
## Add a blog post
96-
97-
TODO: https://github.com/bemanproject/website/issues/12

blog/2024-10-30-about-beman/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
slug: about-beman
3-
title: About Beman
43
authors: [dabrahams]
54
tags: [beman]
65
---
76

7+
# About Beman
8+
89
![A photo of Beman Dawes](./images/beman.png)
910

1011
I met Beman Dawes when I attended my first C++ committee meeting in 1997. I wasn’t even a committee member at that time; I showed up at the meeting because I was trying to get exception safety into the C++ standard and Andrew Koenig had made it clear that arguing for it over email wasn’t going to cut it; I needed to show my face.
@@ -17,4 +18,4 @@ Beman started by asking me to join the other members in the center of the room a
1718

1819
I left that meeting with the realization that it was possible to work together in a way I had never experienced in my regular job, driven by consensus, and that this spirit both raised the level of discourse, and produced better results, than what I had seen before. It put the lie to the disparaging phrase “designed by committee.” So when Beman proposed that we start the Boost Libraries project, I was immediately on board. His idea for Boost would blossom into a unique community of collaborative library designers because of the example he set.
1920

20-
As we grew Boost over the years, so grew our friendship, and when Beman passed away suddenly in 2020, it was a great loss to me personally, and, I think, to the world of programming. Beman never sought the spotlight, and I always wondered what would become of his contribution, which was surely underappreciated. That’s why I was so thrilled to hear that a modern C++ libraries project was being launched in his name. May it continue to demonstrate Beman’s commitment to community and excellence.
21+
As we grew Boost over the years, so grew our friendship, and when Beman passed away suddenly in 2020, it was a great loss to me personally, and, I think, to the world of programming. Beman never sought the spotlight, and I always wondered what would become of his contribution, which was surely underappreciated. That’s why I was so thrilled to hear that a modern C++ libraries project was being launched in his name. May it continue to demonstrate Beman’s commitment to community and excellence.

blog/2025-01-13-beman-intro/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
slug: beman-tutorial
3-
title: Beman Project Introduction Online
43
authors: [JeffGarland]
54
tags: [cppcon, conference]
65
---
76

7+
# Beman Project Introduction Online
88

99
David Sankel’s talk on Beman at 2024 CppCon is now online!
1010
The presentation answers many questions about the project purpose and policies.

blog/2025-01-29-nyc-hackathon/images/20250123_170405.jpg renamed to blog/2025-01-29-nyc-hackathon/images/final-photo.jpg

File renamed without changes.
File renamed without changes.

blog/2025-01-29-nyc-hackathon/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
slug: nyc-hackathon # URL slug for the post
3-
title: "NYC Hackathon" # Title of the post
4-
authors: ["DavidSankel"] # Author(s) of the post
5-
tags: ["hackathon", "nyc", "blog"] # Tags for categorization
2+
slug: nyc-hackathon
3+
authors: ["camio"]
4+
tags: ["hackathon", "beman"]
65
---
76

87
# NYC Hackathon
98

10-
![busy coding](./images/20250123_170307.jpg "Several hackathon members busy coding. They give the impression of serious and intense work happening!")
9+
![busy coding](./images/hacking.jpg "Several hackathon members busy coding. They give the impression of serious and intense work happening!")
1110

1211
Adobe hosted an exciting and intense half-day Beman hackathon where we worked on
1312
adding new Beman libraries, addressed infrastructure issues, and brainstormed
1413
designs for the Beman website.
1514
<!-- truncate -->
15+
1616
It was awesome to collaborate in person. Here's
1717
some of the awesome stuff that got accomplished:
1818

@@ -32,4 +32,4 @@ some of the awesome stuff that got accomplished:
3232
Overall it was productive and a ton of fun. Thanks to Robert, Eddie, Linus,
3333
River, Nick, Bret, and Robert for participating!
3434

35-
![portrait of attendees](./images/20250123_170405.jpg "All the hackathon folks standing together in a portrait looking very cool.")
35+
![portrait of attendees](./images/final-photo.jpg "All the hackathon folks standing together in a portrait looking very cool.")

blog/authors.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
JeffGarland :
2-
name: Jeff Garland
3-
title: Boost C++ Developer, C++ Committee Library Working Group Asst. Chair
4-
url: https://github.com/JeffGarland
5-
image_url: https://avatars.githubusercontent.com/u/4427406?v=4
1+
camio:
2+
name: David Sankel
3+
title: C++ Developer, Beman Lead
4+
url: https://github.com/camio
5+
image_url: https://avatars.githubusercontent.com/u/3770603
66
page: true
77
socials:
8-
github: JeffGarland
8+
github: camio
99

1010
dabrahams:
1111
name: Dave Abrahams
@@ -16,11 +16,11 @@ dabrahams:
1616
socials:
1717
github: dabrahams
1818

19-
DavidSankel:
20-
name: David Sankel
21-
title: C++ Developer, Beman Lead
22-
url: https://github.com/camio
23-
image_url: https://avatars.githubusercontent.com/u/3770603
19+
JeffGarland:
20+
name: Jeff Garland
21+
title: Boost C++ Developer, C++ Committee Library Working Group Asst. Chair
22+
url: https://github.com/JeffGarland
23+
image_url: https://avatars.githubusercontent.com/u/4427406?v=4
2424
page: true
2525
socials:
26-
github: camio
26+
github: JeffGarland

docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const config: Config = {
6868
// Blogging config
6969
onInlineTags: 'warn',
7070
onInlineAuthors: 'warn',
71-
onUntruncatedBlogPosts: 'warn',
71+
onUntruncatedBlogPosts: 'throw', // Enforce truncation of blog posts for previews of blog posts.
7272
},
7373
theme: {
7474
customCss: './src/css/custom.css',
12.5 MB
Loading
6.33 MB
Loading

0 commit comments

Comments
 (0)