Skip to content

Commit 13c7be0

Browse files
committed
initialize docs
1 parent 66c94bb commit 13c7be0

98 files changed

Lines changed: 4213 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM antora/antora
2+
3+
4+
RUN apk add --no-cache \
5+
bash \
6+
curl \
7+
git \
8+
ruby \
9+
ruby-dev \
10+
build-base \
11+
libxml2-dev \
12+
libxslt-dev
13+
14+
RUN gem install --no-document rouge nokogiri
15+
16+
RUN apk add --no-cache python3 py3-pip
17+
18+
RUN pip install pyyaml
19+
RUN pip install watchdog
20+
21+
RUN npm i antora @antora/lunr-extension
22+
23+
USER node
24+

.devcontainer/devcontainer.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "Antora",
3+
"build": {
4+
"context": "..",
5+
"dockerfile": "Dockerfile"
6+
},
7+
"mounts": [
8+
// workaround for google repo
9+
"source=${localWorkspaceFolder}/../.repo/projects/docs.git,target=/workspaces/docs/.git,type=bind,consistency=cached"
10+
]
11+
}

.github/workflows/docs.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and publish docs
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: github-pages
10+
cancel-in-progress: false
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
24+
container:
25+
build:
26+
context: .
27+
dockerfile: .devcontainer/Dockerfile
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v5
32+
33+
- name: Configure Pages
34+
uses: actions/configure-pages@v5
35+
36+
- name: Generate Site
37+
run: python tools/docs.py build
38+
39+
- name: Upload Artifacts
40+
uses: actions/upload-pages-artifact@v4
41+
with:
42+
path: build
43+
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ _site/
1616
# counterproductive to check this file into the repository.
1717
# Details at https://github.com/github/pages-gem/issues/768
1818
Gemfile.lock
19+
20+
**/build/
21+
22+
node_modules/

antora-playbook.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
asciidoc:
2+
attributes:
3+
source-highlighter: rouge
4+
rouge-style: github
5+
site:
6+
title: fuquery
7+
start_page: _::index.adoc
8+
output:
9+
dir: build
10+
content:
11+
sources:
12+
- url: .
13+
start_paths: [.]
14+
# - url: ..
15+
# branches: HEAD
16+
# start_paths: [projects/test/docs]
17+
# - url: ..
18+
# branches: HEAD
19+
# start_paths: [projects/util/docs]
20+
ui:
21+
bundle:
22+
url: ui
23+
antora:
24+
extensions:
25+
- '@antora/lunr-extension'

antora.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: _
2+
version: ~
3+
title: fuquery
4+
nav:
5+
- modules/ROOT/nav.adoc
9.98 KB
Binary file not shown.

modules/ROOT/nav.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* xref:projects.adoc[]
2+
3+
* xref:contributing.adoc[]
4+
** xref:contributing/setup.adoc[]
5+
** xref:contributing/cpp_style.adoc[]
6+
** xref:contributing/documentation.adoc[]
7+
8+
* Maintainer Information
9+
** xref:maintaining/new_project.adoc[]
10+
** xref:maintaining/docker.adoc[]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
= Contributing
2+
3+
Thank you for your interest in contributing to fuquery projects. Contributions of all sizes and shapes are welcome - not just code contributions.
4+
5+
This document applies to all repositories in the https://github.com/fuquery[fuquery organization] unless a repository specifies otherwise.
6+
7+
== Before You Start
8+
9+
- Please check existing issues and pull requests to avoid duplicate work
10+
- For larger changes, consider opening an issue or reaching out on https://discord.gg/YWfdM2tctt[Discord] first to discuss the approach
11+
- Try to keep contributions narrow in scope
12+
13+
== Reporting Issues
14+
15+
When reporting a problem, please include:
16+
17+
- A clear description of the issue
18+
- Steps to reproduce
19+
- Expected vs. actual behavior
20+
- Relevant environment information if applicable
21+
22+
If possible, include a minimal reproducer.
23+
24+
== Submitting Changes
25+
26+
1. Fork the repository and create a topic branch
27+
2. Make your changes
28+
3. Submit a pull request
29+
30+
Pull requests should:
31+
32+
- Clearly describe the change and motivation
33+
- Stay focused on a single topic
34+
- Include updates to documentation when relevant
35+
- Include tests for the introduced changes
36+
37+
Maintainers may request revisions before merging.
38+
39+
== Style
40+
41+
The style used in C++ fuquery projects is roughly documented in xref:contributing/cpp_style.adoc[].
42+
43+
== Licensing
44+
45+
By submitting a contribution, you agree that it will be licensed under the same license as the target project.
46+
fuquery projects are typically licensed under **MIT** or **0BSD**.
47+
48+
== AI-Generated Contributions
49+
50+
Contributions generated wholly or partially by AI systems are generally not welcome.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
= C++ Code Style
2+
3+
This document briefly summarizes stylistic choices made in fuquery subprojects.
4+
5+
== Layout and namespaces
6+
Currently there are three top-level namespaces used in fuqery projects:
7+
8+
* `rsl` for the rsl project
9+
* `re` for the retest project
10+
* `erl` for **e**xperimental **r**eflective **l**ibraries
11+
12+
Relative to the repository's root the primary include path must be `include/<namespace>` where `<namespace>` is the associated top-level namespace. Files in this folder are considered part of the public API, may contribute to the associated top-level namespace directly and shall not have a file extension.
13+
14+
Implementation details shall be collected in a directory whose name starts with `_impl`. For top-level namespaces shared between projects, the project name must be included (ie `include/rsl/_impl_config` for rsl-config). Implementation detail headers shall have the file extension `.hpp` and may **not** contribute to the associated top-level namespace directly.
15+
16+
== Macros
17+
=== Dollar macros
18+
[source,c++ diff]
19+
----
20+
- RSL_INLINE(always)
21+
+ $inline(always)
22+
void foo() {}
23+
----
24+
25+
MSVC, GCC and Clang explicitly support `$` in identifiers. However, GCC notes that this might cause issues with some target assemblers. Since macros are gone at that point, the use of dollars in macro identifiers is unproblematic.
26+
27+
This distinguishes macros clearly from other source constructs, therefore use of dollar macro identifiers is encouraged.
28+
29+
== Identifiers
30+
=== Format
31+
Two different styles are used throughout the projects. For top-level namespaces standard library style should be used, meaning:
32+
[source,c++]
33+
----
34+
// namespaces are always snake_case
35+
namespace rsl {
36+
37+
// snake_case for types in the rsl namespace
38+
struct some_type;
39+
40+
// snake_case for functions, variables etc
41+
void some_func();
42+
constexpr inline bool some_var = true;
43+
}
44+
----
45+
46+
However, in implementation details we are free to use a slightly different style:
47+
[source,c++]
48+
----
49+
// implementation detail namespaces begin with _impl_
50+
namespace rsl::_impl_foo {
51+
52+
// PascalCase for types
53+
struct SomeType;
54+
55+
// snake_case for functions, variables etc
56+
void some_func();
57+
constexpr inline bool some_var = true;
58+
}
59+
----
60+
61+
=== Uglifying members
62+
To ensure specific types are structural types, we sometimes cannot have non-public data members. Whenever this is the case, uglify the identifiers by prepending `_impl_`.
63+
64+
[source,c++ diff]
65+
----
66+
struct something_structural {
67+
- int secret;
68+
+ int _impl_secret;
69+
};
70+
----

0 commit comments

Comments
 (0)