Skip to content

Commit 8c67f1a

Browse files
committed
C, RockyJS, and PKJS docs are all generated properly
1 parent 21fa69d commit 8c67f1a

File tree

8 files changed

+111
-97
lines changed

8 files changed

+111
-97
lines changed

lib/c_docs/doc_member.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,12 @@ def process_data(node, mapping, platform)
9595

9696
def process_typedef(node, mapping, platform)
9797
process_return_type(node, mapping, platform)
98-
@data[platform]['argsstring'] = node.at_css('argsstring').content.to_s
98+
argsstring = node.at_css('argsstring')
99+
if argsstring == nil then
100+
@data[platform]['argsstring'] = ""
101+
else
102+
@data[platform]['argsstring'] = argsstring.content.to_s
103+
end
99104
process_parameter_list(node, mapping, platform)
100105
end
101106

lib/pebble_documentation_c.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def cleanup
5555
def download_and_extract(zip, folder)
5656
open(zip) do | zf |
5757
Zip::File.open(zf.path) do | zipfile |
58+
print("extracted from ", zf.path)
59+
print("\n")
5860
zipfile.each do | entry |
5961
path = File.join(folder, entry.name).sub('/doxygen_sdk/', '/')
6062
FileUtils.mkdir_p(File.dirname(path))

lib/pebble_documentation_js.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def process_members(js_module)
6363
:properties => member['properties'],
6464
:url => url,
6565
:kind => kind,
66-
:summary => member['summary']
66+
:summary => member['memberof']
6767
}
6868
add_symbol(symbol)
6969
js_module[:children].push(symbol)

plugins/generator_docs.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ def generate_docs
8181
generate_docs_c_preview unless @site.data['docs']['c_preview'].nil?
8282
generate_docs_rocky_js
8383
generate_docs_pebblekit_js
84-
generate_docs_pebblekit_android
85-
generate_docs_pebblekit_ios
84+
# generate_docs_pebblekit_android
85+
# generate_docs_pebblekit_ios
8686
end
8787

8888
def render_pages

source/_includes/docs/menu.html

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
11
{% comment %}
2-
Copyright 2025 Google LLC
2+
Copyright 2025 Google LLC
33

4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
77

8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99

10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
1515
{% endcomment %}
1616

1717
<ul>
18-
{% for group in include.tree %}
18+
{% for group in include.tree %}
1919
{% if page.docs_language == 'pebblekit_ios' %}
20-
{% assign open = true %}
20+
{% assign open = true %}
2121
{% elsif include.group.path contains group.name %}
22-
{% assign open = true %}
22+
{% assign open = true %}
2323
{% else %}
24-
{% assign open = false %}
24+
{% assign open = false %}
2525
{% endif %}
2626
{% if group.children.size > 0 %}
27-
<li class="section-menu__item{% if open == true %} open{% if include.group.path.last == group.name %} active{% endif %}{% endif %}">
27+
<li
28+
class="section-menu__item{% if open == true %} open{% if include.group.path.last == group.name %} active{% endif %}{% endif %}">
2829
<a href="{{ group.url }}">{{ group.name }}</a>
2930
<ul>
30-
{% for item in group.children %}
31-
<li class="section-menu__subitem{% if include.group.path contains item.name %} open{% if include.group.path.last == item.name %} active{% endif %}{% endif %}">
31+
{% for item in group.children %}
32+
<li
33+
class="section-menu__subitem{% if include.group.path contains item.name %} open{% if include.group.path.last == item.name %} active{% endif %}{% endif %}">
3234
<a href="{{ item.url }}"><span>{{ item.name }}</span></a>
3335
{% if item.children.size > 0 %}
3436
<ul>
3537
{% for child in item.children %}
3638
{% capture full_url %}{{ child.url }}index.html{% endcapture %}
37-
<li class="section-menu__subsubitem{% if page.url == full_url %} active{% endif %}"><a href="{{ child.url }}"><span>{{ child.name }}</span></a></li>
39+
<li class="section-menu__subsubitem{% if page.url == full_url %} active{% endif %}"><a
40+
href="{{ child.url }}"><span>{{ child.name }}</span></a></li>
3841
{% endfor %}
3942
</ul>
4043
{% endif %}
4144
</li>
42-
{% endfor %}
45+
{% endfor %}
4346
</ul>
4447
</li>
4548
{% endif %}

source/_layouts/docs.html

Lines changed: 55 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# you may not use this file except in compliance with the License.
66
# You may obtain a copy of the License at
77
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
99
#
1010
# Unless required by applicable law or agreed to in writing, software
1111
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,65 +17,71 @@
1717
menu_section: docs
1818
search_primary: docs
1919
---
20-
<div class="section-menu section-menu--docs section-menu--dark">
21-
<div class="section-menu__header">
22-
{% case page.docs_language %}
23-
{% when 'c' %}
24-
<h3><a href="/docs/c/">Pebble C API</a><a href="#"><i class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
25-
{% when 'c_preview' %}
26-
<h3><a href="/docs/c/preview/">Pebble C API (SDK 4 Preview)</a><a href="#"><i class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
27-
{% when 'rockyjs' %}
28-
<h3><a href="/docs/rockyjs/">Pebble JavaScript API</a><a href="#"><i class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
29-
{% when 'pebblekit_js' %}
30-
<h3><a href="/docs/pebblekit-js/">PebbleKit JS</a><a href="#"><i class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
31-
{% when 'pebblekit_ios' %}
32-
<h3><a href="/docs/pebblekit-ios/">PebbleKit iOS</a><a href="#"><i class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
33-
{% when 'pebblekit_android' %}
34-
<h3><a href="/docs/pebblekit-android/">PebbleKit Android</a><a href="#"><i class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
35-
{% else %}
36-
<h3><a href="/docs/">Documentation</a></h3>
37-
{% endcase %}
38-
<ul class="documentation-menu js-doc-menu">
39-
<li><a href="/docs/c/">Pebble C API</a></li>
40-
{% if site.data.docs_tree.c_preview %}
41-
<li><a href="/docs/c/preview/">Pebble C API (preview)</a></li>
42-
{% endif %}
43-
<li><a href="/docs/rockyjs/">Pebble JavaScript API</a></li>
44-
<li><a href="/docs/pebblekit-js/">PebbleKit JS</a></li>
45-
<li><a href="/docs/pebblekit-ios/">PebbleKit iOS</a></li>
46-
<li><a href="/docs/pebblekit-android/">PebbleKit Android</a></li>
47-
</ul>
48-
</div>
20+
<div class="section-menu section-menu--docs section-menu--dark">
21+
<div class="section-menu__header">
4922
{% case page.docs_language %}
5023
{% when 'c' %}
51-
{% include docs/menu.html tree=site.data.docs_tree.c group=page.group %}
24+
<h3><a href="/docs/c/">Pebble C API</a><a href="#"><i
25+
class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
5226
{% when 'c_preview' %}
53-
{% include docs/menu.html tree=site.data.docs_tree.c_preview group=page.group %}
27+
<h3><a href="/docs/c/preview/">Pebble C API (SDK 4 Preview)</a><a href="#"><i
28+
class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
5429
{% when 'rockyjs' %}
55-
{% include docs/menu.html tree=site.data.docs_tree.rockyjs group=page.js_module %}
30+
<h3><a href="/docs/rockyjs/">Pebble JavaScript API</a><a href="#"><i
31+
class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
5632
{% when 'pebblekit_js' %}
57-
{% include docs/menu.html tree=site.data.docs_tree.pebblekit_js group=page.js_module %}
33+
<h3><a href="/docs/pebblekit-js/">PebbleKit JS</a><a href="#"><i
34+
class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
5835
{% when 'pebblekit_ios' %}
59-
{% include docs/menu.html tree=site.data.docs_tree.pebblekit_ios group=page.group %}
36+
<h3><a href="/docs/pebblekit-ios/">PebbleKit iOS</a><a href="#"><i
37+
class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
6038
{% when 'pebblekit_android' %}
61-
{% include docs/menu.html tree=site.data.docs_tree.pebblekit_android group=page.group %}
39+
<h3><a href="/docs/pebblekit-android/">PebbleKit Android</a><a href="#"><i
40+
class="fa fa-chevron-down fa-lg documentation-menu__arrow js-doc-menu-toggle"></i></a></h3>
6241
{% else %}
63-
<ul>
64-
<li class="section-menu__item"><a href="/docs/c/">Pebble C API</a></li>
65-
{% if site.data.docs_tree.c_preview %}
66-
<li class="section-menu__item"><a href="/docs/c/preview/">Pebble C API (preview)</a></li>
67-
{% endif %}
68-
<li class="section-menu__item"><a href="/docs/rockyjs/">Pebble JavaScript API</a></li>
69-
<li class="section-menu__item"><a href="/docs/pebblekit-js/">PebbleKit JS</a></li>
70-
<li class="section-menu__item"><a href="/docs/pebblekit-ios/">PebbleKit iOS</a></li>
71-
<li class="section-menu__item"><a href="/docs/pebblekit-android/">PebbleKit Android</a></li>
72-
<!--
42+
<h3><a href="/docs/">Documentation</a></h3>
43+
{% endcase %}
44+
<ul class="documentation-menu js-doc-menu">
45+
<li><a href="/docs/c/">Pebble C API</a></li>
46+
{% if site.data.docs_tree.c_preview %}
47+
<li><a href="/docs/c/preview/">Pebble C API (preview)</a></li>
48+
{% endif %}
49+
<li><a href="/docs/rockyjs/">Pebble JavaScript API</a></li>
50+
<li><a href="/docs/pebblekit-js/">PebbleKit JS</a></li>
51+
<li><a href="/docs/pebblekit-ios/">PebbleKit iOS</a></li>
52+
<li><a href="/docs/pebblekit-android/">PebbleKit Android</a></li>
53+
</ul>
54+
</div>
55+
{% case page.docs_language %}
56+
{% when 'c' %}
57+
{% include docs/menu.html tree=site.data.docs_tree.c group=page.group %}
58+
{% when 'c_preview' %}
59+
{% include docs/menu.html tree=site.data.docs_tree.c_preview group=page.group %}
60+
{% when 'rockyjs' %}
61+
{% include docs/menu.html tree=site.data.docs_tree.rockyjs group=page.group %}
62+
{% when 'pebblekit_js' %}
63+
{% include docs/menu.html tree=site.data.docs_tree.pebblekit_js group=page.js_module %}
64+
{% when 'pebblekit_ios' %}
65+
{% include docs/menu.html tree=site.data.docs_tree.pebblekit_ios group=page.group %}
66+
{% when 'pebblekit_android' %}
67+
{% include docs/menu.html tree=site.data.docs_tree.pebblekit_android group=page.group %}
68+
{% else %}
69+
<ul>
70+
<li class="section-menu__item"><a href="/docs/c/">Pebble C API</a></li>
71+
{% if site.data.docs_tree.c_preview %}
72+
<li class="section-menu__item"><a href="/docs/c/preview/">Pebble C API (preview)</a></li>
73+
{% endif %}
74+
<li class="section-menu__item"><a href="/docs/rockyjs/">Pebble JavaScript API</a></li>
75+
<li class="section-menu__item"><a href="/docs/pebblekit-js/">PebbleKit JS</a></li>
76+
<li class="section-menu__item"><a href="/docs/pebblekit-ios/">PebbleKit iOS</a></li>
77+
<li class="section-menu__item"><a href="/docs/pebblekit-android/">PebbleKit Android</a></li>
78+
<!--
7379
<li class="section-menu__item"><a href="/docs/web-timeline/">Timeline Web API</a></li>
7480
<li class="section-menu__item"><a href="/docs/web-appglance/">AppGlance Web API</a></li>
7581
-->
76-
</ul>
77-
{% endcase %}
78-
</div>
82+
</ul>
83+
{% endcase %}
84+
</div>
7985
</div><!-- sidebar__wrapper -->
8086
<div class="content content--section-menu">
8187
{% include search.html %}

source/docs/c/index.html

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
<!--
2-
Copyright 2025 Google LLC
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
-->
16-
171
---
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
1816
layout: docs
1917
permalink: /docs/c/
2018
title: C SDK Documentation
@@ -40,14 +38,14 @@ <h1 class="pagetitle">{{ page.title }}</h1>
4038
</p>
4139

4240
{% for module in site.data.docs_tree.c %}
43-
<div class="docs__module">
44-
<h4><a href="{{ module.url }}">{{ module.name }}</a></h4>
45-
{% if module.summary.size > 0 %}
46-
{{ module.summary }}
47-
{% else %}
48-
<p>&nbsp;</p>
49-
{% endif %}
50-
</div>
41+
<div class="docs__module">
42+
<h4><a href="{{ module.url }}">{{ module.name }}</a></h4>
43+
{% if module.summary.size > 0 %}
44+
{{ module.summary }}
45+
{% else %}
46+
<p>&nbsp;</p>
47+
{% endif %}
48+
</div>
5149
{% endfor %}
5250
</div>
5351
</div>

source/docs/rockyjs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h1 class="pagetitle">{{ page.title }}</h1>
3939
{% if module['kind'] == "member" or module['kind'] == "namespace" %}
4040
<div class="docs__module">
4141
<h4><a href="{{ module.url }}">{{ module.name }}</a></h4>
42-
<p>{{ module.summary | markdownify }}</p>
42+
<p>{{ module.summary | default: "" | markdownify }}</p>
4343
</div>
4444
{% endif %}
4545
{% endfor %}

0 commit comments

Comments
 (0)