Skip to content

Commit

Permalink
Merge pull request #3972 from raspberrypi/develop
Browse files Browse the repository at this point in the history
Release latest changes to production
  • Loading branch information
nathan-contino authored Dec 12, 2024
2 parents 51b3a97 + de1448c commit 80f4058
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 39 deletions.
26 changes: 0 additions & 26 deletions documentation/global_boxes.json

This file was deleted.

72 changes: 72 additions & 0 deletions jekyll-assets/_layouts/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,78 @@ <h1 id="docs-header-title">
</ul>
{% endif %}
{% endfor %}

<ul class="sectlevel1">
<input class="toc-toggle-box" type="checkbox" id="datasheets"
/>
<li>
<span>
<label class="toc-toggle" for="{{ subdir.path }}">
<div class="toc-toggle-container">
<a class="level1">
<a title="PDF documentation" class="toc-item no-dropdown" href="https://datasheets.raspberrypi.com/" target="_blank">
<p>Datasheets</p>
</a>
</a>
</div>
</label>
</span>
</li>
</ul>

<ul class="sectlevel1">
<input class="toc-toggle-box" type="checkbox" id="pip"
/>
<li>
<span>
<label class="toc-toggle" for="{{ subdir.path }}">
<div class="toc-toggle-container">
<a class="level1">
<a title="Raspberry Pi compliance documents" class="toc-item no-dropdown" href="https://pip.raspberrypi.com/" target="_blank">
<p>Product Information Portal</p>
</a>
</a>
</div>
</label>
</span>
</li>
</ul>

<ul class="sectlevel1">
<input class="toc-toggle-box" type="checkbox" id="tutorials"
/>
<li>
<span>
<label class="toc-toggle" for="{{ subdir.path }}">
<div class="toc-toggle-container">
<a class="level1">
<a title="Hands-on hardware and software tutorials" class="toc-item no-dropdown" href="https://www.raspberrypi.com/tutorials/" target="_blank">
<p>Tutorials</p>
</a>
</a>
</div>
</label>
</span>
</li>
</ul>

<ul class="sectlevel1">
<input class="toc-toggle-box" type="checkbox" id="forums"
/>
<li>
<span>
<label class="toc-toggle" for="{{ subdir.path }}">
<div class="toc-toggle-container">
<a class="level1">
<a title="User and product support forums" class="toc-item no-dropdown" href="https://forums.raspberrypi.com" target="_blank">
<p>Forums</p>
</a>
</a>
</div>
</label>
</span>
</li>
</ul>
</div>
</div>
</div>
Expand Down
13 changes: 0 additions & 13 deletions scripts/create_output_index_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
def change_file_ext(filename, extension):
return os.path.splitext(filename)[0] + '.' + extension

def get_global_subitems(src_dir):
json_path = os.path.join(src_dir, "global_boxes.json")
with open(json_path) as json_fh:
items = json.load(json_fh)
return items

def build_tab_from_json(tab, adoc_dir, img_dir):
json_path = os.path.join(adoc_dir, tab['from_json'])
tab_key = tab['directory']
Expand Down Expand Up @@ -47,7 +41,6 @@ def build_tab_from_json(tab, adoc_dir, img_dir):
output_json = sys.argv[2]
input_dir = sys.argv[3]
images_dir = sys.argv[4]
global_subitems = get_global_subitems(os.path.join(input_dir, '..'))
with open(input_json) as json_fh:
data = json.load(json_fh)
found_default_tab = False
Expand All @@ -72,12 +65,6 @@ def build_tab_from_json(tab, adoc_dir, img_dir):
del data['tabs'][tab_index]
else:
raise Exception("Tab '{}' in '{}' has neither '{}' nor '{}'".format(tab['title'], input_json, 'path', 'from_json'))
# add the global boxes
if 'subitems' in tab:
for item in global_subitems:
tab['subitems'].append(item)
else:
print("WARNING: no subitems set in {}".format(tab['title']))
if not found_default_tab:
print("WARNING: no default_tab set in {} so index page will look odd".format(input_json))

Expand Down

0 comments on commit 80f4058

Please sign in to comment.