Skip to content

Commit c0b9f14

Browse files
committed
Merge branch '2-docs-build-github-pages-site-for-h5cpp-compiler' into release
2 parents 1db8630 + d500b04 commit c0b9f14

File tree

17 files changed

+974
-1
lines changed

17 files changed

+974
-1
lines changed

.github/workflows/docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [release, staging]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install MkDocs + Material theme
24+
run: |
25+
pip install mkdocs mkdocs-material
26+
27+
- name: Build documentation
28+
run: mkdocs build
29+
30+
- name: Deploy to GitHub Pages
31+
uses: peaceiris/actions-gh-pages@v4
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
publish_dir: ./site

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ The result is a seamless persistence much similar to python, java or other refle
2323

2424
The following excerpt shows the mechanism, how `vec` variable is marked by `h5::write` operator. When `h5cpp` tool is invoked it builds the full AST of the translation unit, finds the referenced types, then in topological order generates HDF5 COMPOUND datatype descriptors. The generated file has include guards, and meant to be used with [H5CPP template library](h5cpp.org). POD struct types may be arbitrary deep, embedded in POD C like arrays, and may be referenced from STL containers. Currently `stl::vector` is supported, but in time full support will be provided.
2525

26+
## Installation
27+
```bash
28+
sudo apt install build-essential cmake
29+
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build
30+
cmake --build build --parallel
31+
sudo cmake --install build
32+
```
33+
2634
```cpp
2735
...
2836
std::vector<sn::example::Record> vec
@@ -80,6 +88,29 @@ namespace sn {
8088
/* END IGNORED STRUCTS */
8189
```
8290
91+
92+
# Python virtual environment for this website
93+
94+
## Setup
95+
96+
```bash
97+
python3 -m venv .venv # Create a virtual env (Python 3.10+ recommended)
98+
source .venv/bin/activate # Activate: Linux / macOS
99+
# On Windows use: .venv\Scripts\activate
100+
101+
pip install --upgrade pip # Upgrade pip
102+
pip install mkdocs-material # Install MkDocs + Material theme
103+
pip install python-frontmatter jinja2 python-dateutil pyyaml # Extra deps
104+
```
105+
106+
## Run MkDocs locally
107+
108+
```bash
109+
source .venv/bin/activate
110+
mkdocs serve --dev-addr=127.0.0.1:9000 # Live preview at http://127.0.0.1:9000
111+
mkdocs build -v # Build static site locally
112+
```
113+
83114
<!-- Ubuntu 22.04 -->
84115
[200]: https://vargaconsulting.github.io/h5cpp-compiler/badges/ubuntu-22.04-gcc-13.svg
85116
[201]: https://vargaconsulting.github.io/h5cpp-compiler/badges/ubuntu-22.04-gcc-14.svg
@@ -110,4 +141,4 @@ namespace sn {
110141
[702]: https://vargaconsulting.github.io/h5cpp-compiler/badges/windows-latest-gcc-15.svg
111142
[710]: https://vargaconsulting.github.io/h5cpp-compiler/badges/windows-latest-clang-14.svg
112143
[711]: https://vargaconsulting.github.io/h5cpp-compiler/badges/windows-latest-clang-15.svg
113-
[712]: https://vargaconsulting.github.io/h5cpp-compiler/badges/windows-latest-clang-17.svg
144+
[712]: https://vargaconsulting.github.io/h5cpp-compiler/badges/windows-latest-clang-17.svg
Lines changed: 58 additions & 0 deletions
Loading
Lines changed: 58 additions & 0 deletions
Loading

docs/assets/hex-dark.svg

Lines changed: 12 additions & 0 deletions
Loading

docs/assets/hex-light.svg

Lines changed: 12 additions & 0 deletions
Loading

docs/assets/logo.svg

Lines changed: 26 additions & 0 deletions
Loading

docs/assets/scribble-dark.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/assets/scribble-light.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)