Skip to content

Commit 71a38c9

Browse files
committed
Create website for ClangQL docs
1 parent 9721a9e commit 71a38c9

File tree

7 files changed

+209
-10
lines changed

7 files changed

+209
-10
lines changed

.github/workflows/docs.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build and deploy docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- docs/**
9+
- mkdocs.yml
10+
permissions:
11+
contents: write
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: 3.x
20+
- run: pip install mkdocs-material
21+
- run: mkdocs gh-deploy --force

docs/ASTFunctions.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/assets/clangql_logo.svg

Lines changed: 9 additions & 0 deletions
Loading

docs/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Welcome to MkDocs
2+
3+
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
4+
5+
## Commands
6+
7+
* `mkdocs new [dir-name]` - Create a new project.
8+
* `mkdocs serve` - Start the live-reloading docs server.
9+
* `mkdocs build` - Build the documentation site.
10+
* `mkdocs -h` - Print help message and exit.
11+
12+
## Project layout
13+
14+
mkdocs.yml # The configuration file.
15+
docs/
16+
index.md # The documentation homepage.
17+
... # Other markdown pages, images and other files.
File renamed without changes.

docs/tables.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## Tables structures
2+
3+
### Classes table
4+
5+
| Name | Type | Description |
6+
| ------------- | --------- | ------------------------------- |
7+
| name | Text | Class variable name |
8+
| is_struct | Boolean | True if it a struct declaration |
9+
| bases_count | Integer | Number of bases for this class |
10+
| methods_count | Integer | Number of methods declarations |
11+
| fields_count | Integer | Number of fields declarations |
12+
| source_loc | SourceLoc | Source location of AST node |
13+
14+
---
15+
16+
### Enums table
17+
18+
| Name | Type | Description |
19+
| --------------- | --------- | -------------------------------- |
20+
| name | Text | Enumeration name |
21+
| constants_count | Integer | Number of constants in this enum |
22+
| type_literal | Text | Type literal for enum constants |
23+
| source_loc | SourceLoc | Source location of AST node |
24+
25+
---
26+
27+
### Unions table
28+
29+
| Name | Type | Description |
30+
| ------------ | --------- | ----------------------------- |
31+
| name | Text | Union name |
32+
| size | Integer | The size of union in bits |
33+
| fields_count | Integer | Number of fields declarations |
34+
| source_loc | SourceLoc | Source location of AST node |
35+
36+
---
37+
38+
### Functions table
39+
40+
| Name | Type | Description |
41+
| ------------ | ------------ | ---------------------------------- |
42+
| name | Text | Function or Method name |
43+
| signature | Text | Parameters and return type literal |
44+
| return_type | Text | Return type |
45+
| ast_function | FunctionNode | AST node of the function |
46+
| source_loc | SourceLoc | Source location of AST node |
47+
48+
---
49+
50+
### Globals table<
51+
52+
| Name | Type | Description |
53+
| ----------- | --------- | --------------------------------- |
54+
| name | Text | Global variable name |
55+
| type | Text | Global variable type literal |
56+
| is_volatile | Boolean | True if variable type is volatile |
57+
| source_loc | SourceLoc | Source location of AST node |

mkdocs.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Project information
2+
site_name: ClangQL
3+
site_url: https://amrdeveloper.github.io/clangql
4+
site_description: A SQL Like query language to perform queries on LLVM C/C++ files.
5+
site_author: AmrDeveloper
6+
7+
# Repository
8+
repo_name: Amrdeveloper/ClangQL
9+
repo_url: https://github.com/amrdeveloper/ClangQL
10+
11+
# Copyright
12+
copyright: Copyright &copy; 2025 Amr Hesham
13+
14+
# Configuration
15+
theme:
16+
name: material
17+
logo: assets/clangql_logo.svg
18+
favicon: assets/clangql_logo.svg
19+
20+
icon:
21+
repo: fontawesome/brands/github
22+
edit: material/pencil
23+
view: material/eye
24+
25+
font:
26+
code: JetBrains Mono
27+
28+
palette:
29+
- scheme: default
30+
primary: white
31+
accent: light blue
32+
toggle:
33+
icon: material/toggle-switch
34+
name: Switch to dark mode
35+
36+
- scheme: slate
37+
primary: black
38+
accent: light blue
39+
toggle:
40+
icon: material/toggle-switch-off-outline
41+
name: Switch to light mode
42+
43+
features:
44+
# Content features
45+
- content.code.annotate
46+
- content.code.copy
47+
- content.code.select
48+
- content.action.edit
49+
- content.tooltips
50+
51+
# Navigation features
52+
- content.code.annotate
53+
- navigation.footer
54+
- navigation.indexes
55+
- navigation.sections
56+
- navigation.tracking
57+
- navigation.expand
58+
- navigation.instant.progress
59+
60+
# Search features
61+
- search.suggest
62+
- search.highlight
63+
- search.share
64+
65+
plugins:
66+
- optimize
67+
- offline
68+
- search
69+
70+
# Extensions
71+
markdown_extensions:
72+
- pymdownx.highlight:
73+
use_pygments: true
74+
anchor_linenums: true
75+
line_spans: __span
76+
pygments_lang_class: true
77+
- pymdownx.inlinehilite
78+
- pymdownx.snippets
79+
- pymdownx.superfences:
80+
custom_fences:
81+
- name: mermaid
82+
class: mermaid
83+
format: !!python/name:pymdownx.superfences.fence_code_format
84+
85+
# Page tree
86+
nav:
87+
- Home: index.md
88+
- Tables: tables.md
89+
- Matchers:
90+
- Function: matchers/function.md
91+
92+
extra:
93+
social:
94+
- icon: fontawesome/brands/github
95+
link: https://github.com/amrdeveloper
96+
name: AmrDeveloper on Github
97+
- icon: fontawesome/brands/twitter
98+
link: https://twitter.com/AmrDeveloper
99+
name: AmrDeveloper on Twitter
100+
- icon: fontawesome/brands/linkedin
101+
link: https://www.linkedin.com/in/amrdeveloper
102+
name: AmrDeveloper on Linkedin
103+
- icon: fontawesome/brands/medium
104+
link: https://amrdeveloper.medium.com
105+
name: AmrDeveloper on Medium

0 commit comments

Comments
 (0)