Proof of concept - WIP
diff --git a/docs/examples b/docs/examples
new file mode 120000
index 0000000..a6573af
--- /dev/null
+++ b/docs/examples
@@ -0,0 +1 @@
+../examples
\ No newline at end of file
diff --git a/docs/geode-native-book/config.yml b/docs/geode-native-book/config.yml
index 64645fc..b459a65 100644
--- a/docs/geode-native-book/config.yml
+++ b/docs/geode-native-book/config.yml
@@ -23,6 +23,10 @@
name: geode-native-docs
directory: docs/guide-native/18
subnav_template: geode-nc-nav
+ dependent_sections:
+ - repository:
+ name: examples
+ no-docs: true
template_variables:
product_name_long: Apache Geode
diff --git a/docs/geode-native-docs/getting-started/getting-started-nc-client.html.md.erb b/docs/geode-native-docs/getting-started/getting-started-nc-client.html.md.erb
index 187f340..fe0d104 100644
--- a/docs/geode-native-docs/getting-started/getting-started-nc-client.html.md.erb
+++ b/docs/geode-native-docs/getting-started/getting-started-nc-client.html.md.erb
@@ -41,6 +41,10 @@
Once the connection pool and the shared region are in place, your client application is ready to share data with the server.
+**Code Snippet Test**
+
+<%= yield_for_code_snippet from: 'examples', at: 'put-get-remove-snippetA' %>
+
**C++ Example**
This example of connecting to the server is taken from the C++ `put-get-remove` example.
diff --git a/examples/cpp/put-get-remove/main.cpp b/examples/cpp/put-get-remove/main.cpp
index 8005682..c0ba100 100644
--- a/examples/cpp/put-get-remove/main.cpp
+++ b/examples/cpp/put-get-remove/main.cpp
@@ -15,6 +15,7 @@
* limitations under the License.
*/
+// code_snippet put-get-remove-snippetA start cpp
#include <iostream>
#include <geode/CacheFactory.hpp>
@@ -60,3 +61,4 @@
cache.close();
}
+// code_snippet put-get-remove-snippetA end