Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release latest changes to production #3972

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading