From 57f2cf55d78f9c08b39aeddfe3f2979409f7aaa5 Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 22 Jul 2025 16:14:04 +0200 Subject: [PATCH 1/9] Fix 3 more anchor links --- docs/fix_anchor_links.py | 2 +- docs/generator.mdx | 2 +- docs/getting-started.mdx | 2 +- docs/schema-changes.mdx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/fix_anchor_links.py b/docs/fix_anchor_links.py index b75eadb..28415c7 100644 --- a/docs/fix_anchor_links.py +++ b/docs/fix_anchor_links.py @@ -207,7 +207,7 @@ def fix_anchor_in_url(url_with_anchor: str, all_headings: Dict[str, Dict[str, st # C++ specific anchors 'cmake-support': 'cmake-integration', 'cmake-3.14': 'objectbox-library', - 'reset-data-new-uid-on-a-property': 'reset-data-new-uid-on-a-property', + 'reset-data-new-uid-on-a-property': 'reset-data---new-uid-on-a-property', 'standalone': 'using-the-standalone-generator', } diff --git a/docs/generator.mdx b/docs/generator.mdx index 14160fe..e78751d 100644 --- a/docs/generator.mdx +++ b/docs/generator.mdx @@ -38,7 +38,7 @@ For an intro to the generator, see also the [installation guide](installation#ob When using ObjectBox within your project, you typically need two things: the runtime library and the the build-time ObjectBox Generator. The generator takes a data model (see [Entity Annotations](entity-annotations)) as input and generates `struct`s, a data model representation as code and additional glue code for a tight and fast integration of your individual data types and the ObjectBox API. -If you are using CMake, it's highly recommended to use the CMake integration of the ObjectBox Generator. For all other setups, triggering the generator in [standalone mode](generator#standalone) is also supported. +If you are using CMake, it's highly recommended to use the CMake integration of the ObjectBox Generator. For all other setups, triggering the generator in [standalone mode](generator#using-the-standalone-generator) is also supported. :::info The ObjectBox Generator binary is currently not available for Linux/Windows ARM architectures (pull requests are welcome). The macOS as universal binary supports ARM64 and AMD64 architectures. diff --git a/docs/getting-started.mdx b/docs/getting-started.mdx index 36faa90..ebe6611 100644 --- a/docs/getting-started.mdx +++ b/docs/getting-started.mdx @@ -250,7 +250,7 @@ handle_error: // print error and clean up If you've followed the installation instructions, you should be able to compile the example -If you are using CMake, like shown in the [installation section](installation#cmake-3.14), just add the generated `tasklist.obx.cpp` file to the `myapp` target. +If you are using CMake, like shown in the [installation section](installation#objectbox-library), just add the generated `tasklist.obx.cpp` file to the `myapp` target. The `add_executable` call in the CMake file now looks like this: diff --git a/docs/schema-changes.mdx b/docs/schema-changes.mdx index decba8c..63b7f3b 100644 --- a/docs/schema-changes.mdx +++ b/docs/schema-changes.mdx @@ -75,7 +75,7 @@ uid annotation value must not be empty: ``` :::info -Note how for a property, the output is slightly different. It's because you have two options, either renaming the property or resetting (clearing) it's stored data. See [Reset data - new UID on a property](schema-changes#reset-data-new-uid-on-a-property) for more details. +Note how for a property, the output is slightly different. It's because you have two options, either renaming the property or resetting (clearing) it's stored data. See [Reset data - new UID on a property](schema-changes#reset-data---new-uid-on-a-property) for more details. ::: **Step 3:** Apply the UID printed in the error message to your entity/property: From 0c3d54dcd11da67c1a57a78e97372b151cd4cf8e Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 22 Jul 2025 16:14:37 +0200 Subject: [PATCH 2/9] docusaurus.config.ts: adjust editUrl and follow us link --- docusaurus.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index ffe5300..40d3353 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -50,7 +50,7 @@ const config: Config = { routeBasePath: '/', // serve docs at / sidebarPath: require.resolve('./sidebars.ts'), editUrl: - 'https://github.com/objectbox/objectbox-c-cpp-docs/blob/main/website/', + 'https://github.com/objectbox/objectbox-c-cpp-docs/blob/main/', }, // If you don't need a blog, you can disable it: blog: false, @@ -105,7 +105,7 @@ const config: Config = { //target: '_self', // ← This prevents external link behavior }, { - href: 'https://twitter.com/objectbox_io', + href: 'https://x.com/objectbox_io', label: 'Follow us', position: 'right', //target: '_self', // ← This prevents external link behavior From 97f1b5cec6ec2c178312e4f14f32eb281e973a58 Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 22 Jul 2025 16:39:11 +0200 Subject: [PATCH 3/9] Initial build.yml for GitHub Actions --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5228231 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +name: Build and Test + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run type check + run: npm run typecheck + + - name: Build documentation + run: npm run build From aa58b4126cdf770f6b9c03373040b41563f89c20 Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 22 Jul 2025 16:45:31 +0200 Subject: [PATCH 4/9] GitHub Actions: use fixed Ubuntu version, fail on build warnings --- .github/workflows/build.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5228231..1f57c5b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout repository @@ -24,5 +24,12 @@ jobs: - name: Run type check run: npm run typecheck - - name: Build documentation - run: npm run build + - name: Build documentation and check for warnings + run: | + npm run build 2>&1 | tee build.log + if grep -i "warning" build.log; then + echo " Build completed with warnings. Failing the build." + exit 1 + else + echo " Build completed without warnings." + fi From 05b2cccbca9dcbd1b731ddddf21b6b88f337d1ec Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 22 Jul 2025 16:48:51 +0200 Subject: [PATCH 5/9] custom.css: commented out bad "/background-color" style Not sure what was intended here --- src/css/custom.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index e8d3096..91c3948 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -292,7 +292,7 @@ div[role="tabpanel"] { border-top: 0px solid var(--objectbox-grey-border) !important; border-bottom: 1px solid var(--objectbox-grey-border) !important; border-radius: 0 0 6px 6px !important; - /background-color: rgb(255, 255, 255) !important; + /*background-color: rgb(255, 255, 255) !important;*/ /*background-color: rgb(152, 231, 27) !important; /* DEBUG */ padding: 20px !important; /*margin: 0 !important; we also tried margin-top, but this did not influence the missing line between the tab header and the actual tab*/ @@ -917,4 +917,3 @@ div[class*="docPage"] { /* outline: 30px solid rgb(255, 98, 0) !important;*/ } } - From a3e8d3337a3f64eda22d421c9054e6343f513e9f Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 22 Jul 2025 17:15:07 +0200 Subject: [PATCH 6/9] Delete "14.x" file, not sure what its purpose was --- 14.x | 1 - 1 file changed, 1 deletion(-) delete mode 100644 14.x diff --git a/14.x b/14.x deleted file mode 100644 index ee09fac..0000000 --- a/14.x +++ /dev/null @@ -1 +0,0 @@ -v20.11.1 From 3e68ead2352fe8bb91be9d9ec0a5541ebfde0acb Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 22 Jul 2025 17:21:46 +0200 Subject: [PATCH 7/9] .gitignore: add .idea/ --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b2d6de3..f8ab39d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,16 @@ # Dependencies /node_modules -# Production +# Production (generated static files) /build # Generated files .docusaurus .cache-loader +# IDE files +.idea/ + # Misc .DS_Store .env.local From 6aef489e9fe9b1ef93e95c424a2ffb8d4e8241ea Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 22 Jul 2025 17:43:43 +0200 Subject: [PATCH 8/9] Fix a couple of typos --- README.md | 4 ++-- docs/README.mdx | 2 +- docs/generator.mdx | 4 ++-- docs/installation.mdx | 7 +++---- docs/store.mdx | 4 +--- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c1efff2..c537cfd 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ The **text content** is written in the markdown format and the [docs](docs/) fol Other resources: -* **Images** are places in the [static/img/assets/](static/img/assets/) folder. +* **Images** are placed in the [static/img/assets/](static/img/assets/) folder. * The **main navigation** is located in the [sidebars.ts](sidebars.ts) file. * The main **configuration** is done in the [docusaurus.config.ts](docusaurus.config.ts) file. -* CSS styles are written in the [src/css/custom.css](src/css/custom.css) file. +* Custom **CSS styles** to overwrite the theme's default are located in the [src/css/custom.css](src/css/custom.css) file. Notes regarding image file names: only use lowercase and no spaces. diff --git a/docs/README.mdx b/docs/README.mdx index 76fdf55..b3343cd 100644 --- a/docs/README.mdx +++ b/docs/README.mdx @@ -36,7 +36,7 @@ This is the ObjectBox documentation for our C and C++ APIs. We strive to provide Jobs: We're looking for a [C++ Developer](https://objectbox.io/jobs/objectbox-senior-c-plusplus-developer/) with a ❤️ for performant code ::: -Are you ready use ObjectBox? These two pages will get you up to speed: +Are you ready to use ObjectBox? These two pages will get you up to speed:
diff --git a/docs/generator.mdx b/docs/generator.mdx index e78751d..68f229a 100644 --- a/docs/generator.mdx +++ b/docs/generator.mdx @@ -36,7 +36,7 @@ This is the reference guide on the ObjectBox Generator, a build-time tool for Ob For an intro to the generator, see also the [installation guide](installation#objectbox-generator) and [Generating Binding Code](getting-started#generating-binding-code). ::: -When using ObjectBox within your project, you typically need two things: the runtime library and the the build-time ObjectBox Generator. The generator takes a data model (see [Entity Annotations](entity-annotations)) as input and generates `struct`s, a data model representation as code and additional glue code for a tight and fast integration of your individual data types and the ObjectBox API. +When using ObjectBox within your project, you typically need two things: the runtime library and the build-time ObjectBox Generator. The generator takes a data model (see [Entity Annotations](entity-annotations)) as input and generates `struct`s, a data model representation as code and additional glue code for a tight and fast integration of your individual data types and the ObjectBox API. If you are using CMake, it's highly recommended to use the CMake integration of the ObjectBox Generator. For all other setups, triggering the generator in [standalone mode](generator#using-the-standalone-generator) is also supported. @@ -57,7 +57,7 @@ Once you have the ObjectBox runtime library set up via `FetchContent` (see [inst find_package(ObjectBoxGenerator 4.0.0 REQUIRED) ``` -With that, the CMake funciton add\_obx\_schema is now available (see next section). +With that, the CMake function add\_obx\_schema is now available (see next section). ### Add the schema with `add_obx_schema` diff --git a/docs/installation.mdx b/docs/installation.mdx index 1a50550..4a7c5da 100644 --- a/docs/installation.mdx +++ b/docs/installation.mdx @@ -91,7 +91,7 @@ endif() add_executable(myapp main.cpp) target_link_libraries(myapp objectbox) -```cmake +``` If you want to integrate the ObjectBox-Generator via CMake (as an alternative to offline installation and pre-generation of C++ sources), use the following snippet: ```cmake @@ -105,9 +105,8 @@ add_obx_schema( INSOURCE # Opt-in: Generate in source directory CXX_STANDARD 11 # Defaults to C++14 otherwise ) -```cmake -\ -If you want to use an ObjectBox Sync variant of the library, change the list line to: +``` +If you want to use an ObjectBox Sync variant of the library, change the `target_link_libraries` to: ```cmake title="CMakeLists.txt" target_link_libraries(myapp objectbox-sync) diff --git a/docs/store.mdx b/docs/store.mdx index 42a1000..1d7714c 100644 --- a/docs/store.mdx +++ b/docs/store.mdx @@ -97,7 +97,7 @@ obx_store_open(opt); Available since v0.21.0 ::: -You can use ObjectBox alsofor non-persistent in-memory databases. To create a memory-backed store, use the directory prefix "`memory:`" and pick a name for the database to address it, e.g. “memory:myApp”. Apart from the special prefix, it's using the same "directory" option call: +You can use ObjectBox also for non-persistent in-memory databases. To create a memory-backed store, use the directory prefix "`memory:`" and pick a name for the database to address it, e.g. “memory:myApp”. Apart from the special prefix, it's using the same "directory" option call: @@ -355,5 +355,3 @@ Once you created the store, it gives you access to several ways to interact with * [**Box API**](getting-started#working-with-object-boxes)**:** easy to use object-based API with implicit transactions. It is used in combination with the ObjectBox Generator, which generates the source code for data and Box classes. Check the getting started track for examples. * [**Query API**](queries)**:** In combination with the Box API, you can build powerful queries using the query builder. Once built, query instances can be executed multiple times to retrieve data. * [**Explicit Transactions**](transactions)**:** Often it's a good idea to group several operations into a single "batch", or more precisely, one transaction. Batched transactions are not only faster, but also consider safe state changes for your data. - - From a142e05a191d6aefc5cfa8389bef8058d88c5b52 Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 22 Jul 2025 18:00:02 +0200 Subject: [PATCH 9/9] Navbar: fix sync docs link, add GitHub (Docs) link --- docusaurus.config.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 40d3353..6e1845d 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -93,7 +93,7 @@ const config: Config = { //target: '_self', // ← This prevents external link behavior }, { - href: 'https://docs.objectbox.io/sync', + href: 'https://sync.objectbox.io', label: 'Data Sync Docs', position: 'right', // target: '_self', // ← This prevents external link behavior @@ -110,7 +110,13 @@ const config: Config = { position: 'right', //target: '_self', // ← This prevents external link behavior }, - + { + href: 'https://github.com/objectbox/objectbox-c-cpp-docs', + label: 'GitHub (Docs)', + position: 'right', + //target: '_self', // ← This prevents external link behavior + }, + ], }, copyright: `© ${new Date().getFullYear()} ObjectBox`,