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

Change docs structure v3.0 (#3722) #3723

Merged
merged 54 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
b319b02
Reset docs (#3722)
npentrel Dec 2, 2024
2e5bfbb
Update naming (#3725)
npentrel Dec 3, 2024
6396d09
Draft Fleet content (#3727)
npentrel Dec 3, 2024
52099de
Fix empty pages to be not clickable (#3728)
npentrel Dec 3, 2024
cc86a96
Update fleet content (#3729)
npentrel Dec 4, 2024
ef3a0d5
Update deploy section (#3732)
npentrel Dec 5, 2024
1529242
Add next cards (#3737)
npentrel Dec 6, 2024
01bb4f4
Updates to IA and styling (#3754)
npentrel Dec 11, 2024
cd61ab7
Fix order (#3755)
npentrel Dec 11, 2024
815f712
Minor updates (#3756)
npentrel Dec 11, 2024
f2ba011
Readd provisioning content (#3757)
npentrel Dec 11, 2024
63fddf1
Make changes based on Bill's feedback (#3760)
npentrel Dec 12, 2024
7228d7a
Make changes based on Bill's feedback 2 (#3761)
npentrel Dec 12, 2024
c973166
v3.0 edits (#3743)
sguequierre Dec 16, 2024
12a5038
Hide reference pages (#3771)
npentrel Dec 17, 2024
30f7952
Clear fleet page
npentrel Dec 17, 2024
ab56eb5
Add platform diagram landing pages (#3762)
npentrel Dec 17, 2024
c58409a
Add fleet landing page
npentrel Dec 17, 2024
4097344
v3.0 edits Apply feedback (#3770)
sguequierre Dec 19, 2024
2ad5122
JT V3 edits (#3759)
JessamyT Dec 21, 2024
4644bba
Update machine settings information (#3772)
npentrel Jan 2, 2025
d8a77e6
Update CSS (#3780)
npentrel Jan 3, 2025
198ea6f
Update header (#3781)
npentrel Jan 3, 2025
6f9e611
Fix docs logo (#3782)
npentrel Jan 3, 2025
21ec3be
Add first landing page diagrams (#3783)
npentrel Jan 3, 2025
ec9b04d
Fix refs for landing pages (#3784)
npentrel Jan 3, 2025
3e241a8
Add dev landing page (#3785)
npentrel Jan 3, 2025
02d08d5
JT edits pt 2 (#3776)
JessamyT Jan 3, 2025
51f116d
Move static files (#3786)
npentrel Jan 3, 2025
82e1052
Update all landing pages (#3788)
npentrel Jan 6, 2025
a28f3bd
Address v3 feedback (#3787)
JessamyT Jan 6, 2025
9cea553
Fix build nesting (#3789)
npentrel Jan 6, 2025
9ed1670
Update navigation cards (#3790)
npentrel Jan 6, 2025
1d47927
center on landing page
npentrel Jan 6, 2025
7274544
v3.0 edits apply feedback (#3777)
sguequierre Jan 6, 2025
27af533
Add small cards to and tweak supported hardware page (#3792)
JessamyT Jan 6, 2025
b311a0a
Add component APIs to left nav (#3793)
JessamyT Jan 6, 2025
4044f89
Update many links (#3795)
JessamyT Jan 7, 2025
6e24a51
Fix a couple more links (#3797)
JessamyT Jan 7, 2025
c686c56
Update some dev and tut links (#3796)
JessamyT Jan 7, 2025
5b243fa
v3.0 fix some links and feedback (#3794)
sguequierre Jan 7, 2025
fe2f078
Fix cards (#3798)
npentrel Jan 7, 2025
5cc5804
Update links (#3799)
npentrel Jan 7, 2025
8f9f798
Add v3.0 aliases for data section (#3800)
sguequierre Jan 7, 2025
f41decf
Fix more links (#3802)
npentrel Jan 7, 2025
96ad978
Update lorem ipsum (#3805)
npentrel Jan 7, 2025
17c9b0c
Add aliases to microRDK resources etc (#3804)
JessamyT Jan 7, 2025
c5c9332
Run prettier (#3806)
npentrel Jan 7, 2025
953fe67
Update links and aliases (#3808)
JessamyT Jan 7, 2025
7ee49f6
Add aliases (#3807)
npentrel Jan 7, 2025
e254fcc
Update how-sync-works
npentrel Jan 7, 2025
81f475f
Update vale rule
npentrel Jan 7, 2025
b29a737
WIP
npentrel Jan 7, 2025
49a15b1
Move vision service and update typesence logic
npentrel Jan 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/vale/styles/Viam/AvoidWithSubstitutionViam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ action:
name: replace
swap:
in the website: on the website
web app: Viam app or Viam platform
user of an org: member of an org
compute parts: Computer
microprocessor: Raspberry Pi or Jetson or another specific term
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_python_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def parse(type, names):
# Parse the Docs site's service page
if args.local:
if type == "app" or type == "robot":
with open(f"dist/appendix/apis/{service}/index.html") as fp:
with open(f"dist/dev/reference/apis/{service}/index.html") as fp:
soup2 = BeautifulSoup(fp, 'html.parser')
else:
if service in services_page_mapping.keys():
Expand Down
33 changes: 11 additions & 22 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,17 @@ jobs:
name: tutorials-file
path: ./public/tutorials/typesense.json

- name: Upload how-tos search file
uses: actions/upload-artifact@v4
with:
name: howtos-file
path: ./public/how-tos/typesense.json

- name: Upload components models file
uses: actions/upload-artifact@v4
with:
name: components-models-file
path: ./public/components/typesense.json
path: ./public/operate/reference/components/typesense.json

- name: Upload services models file
uses: actions/upload-artifact@v4
with:
name: services-models-file
path: ./public/services/typesense.json
# - name: Upload services models file
# uses: actions/upload-artifact@v4
# with:
# name: services-models-file
# path: ./public/operate/reference/services/typesense.json

deploy:
environment:
Expand Down Expand Up @@ -113,11 +107,6 @@ jobs:
with:
python-version: "3.9"
cache: "pip" # caching pip dependencies
- name: Download the how-tos file
uses: actions/download-artifact@v4
with:
name: howtos-file
path: "how-tos"
- name: Download the tutorials file
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -145,11 +134,11 @@ jobs:
with:
name: components-models-file
path: "components"
- name: Download the services models file
uses: actions/download-artifact@v4
with:
name: services-models-file
path: "services"
# - name: Download the services models file
# uses: actions/download-artifact@v4
# with:
# name: services-models-file
# path: "services"
- run: pip install -r .github/workflows/requirements.txt
- name: "Update modular resources"
run: python3 .github/workflows/get_modular_resources.py
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/get_modular_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ async def main():
print("INSERTED")
print(insert_resp)

# Get built-in resources from services/typesense.json
with open('services/typesense.json') as f:
resources = json.load(f)
for r in resources:
print("RESOURCE")
print(r)
r["last_updated"] = time_now
r["total_organization_usage"] = int(r["total_organization_usage"])
r["total_robot_usage"] = int(r["total_robot_usage"])
print(r)
insert_resp = typesense_client.collections['resources'].documents.upsert(r)
print("INSERTED")
print(insert_resp)
# # Get built-in resources from services/typesense.json
# with open('services/typesense.json') as f:
# resources = json.load(f)
# for r in resources:
# print("RESOURCE")
# print(r)
# r["last_updated"] = time_now
# r["total_organization_usage"] = int(r["total_organization_usage"])
# r["total_robot_usage"] = int(r["total_robot_usage"])
# print(r)
# insert_resp = typesense_client.collections['resources'].documents.upsert(r)
# print("INSERTED")
# print(insert_resp)

# Create a request to list registry items and get the response from the app
request = ListRegistryItemsRequest(organization_id=cloud._organization_id)
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/update_sdk_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,10 @@
"SLAM service": "/services/slam/",
"frame": "/services/frame-system/",
"Viam app": "https://app.viam.com/",
"organization settings page": "/cloud/organizations/",
"image tags": "/fleet/dataset/#image-tags",
"organization settings page": "/manage/reference/organize/",
"image tags": "/data-ai/ai/create-dataset/#label-your-images",
"API key": "/fleet/cli/#authenticate",
"board model": "/components/board/#configuration"
"board model": "/dev/reference/apis/components/board/"
}

## Language-specific resource name overrides:
Expand Down Expand Up @@ -617,7 +617,7 @@ def link_data_types(sdk, data_type_string):

## Link matching text, used in write_markdown():
## NOTE: Currently does not support formatting for link titles
## (EXAMPLE: bolded DATA tab here: https://docs.viam.com/appendix/apis/data-client/#binarydatabyfilter)
## (EXAMPLE: bolded DATA tab here: https://docs.viam.com/dev/reference/apis/data-client/#binarydatabyfilter)
def link_description(format_type, full_description, link_text, link_url):

## Supports 'md' link styling or 'html' link styling.
Expand Down Expand Up @@ -1830,23 +1830,23 @@ def write_markdown(type, names, methods):
if type == 'component':
## Replace underscores, and convert generic_component to just generic:
resource_adjusted = resource.replace('generic_component', 'generic').replace('_','-')
proto_anchor_link = '/appendix/apis/components/' + resource_adjusted + '/#' + proto_link
proto_anchor_link = '/dev/reference/apis/components/' + resource_adjusted + '/#' + proto_link
elif type == 'service' and resource in ['base_remote_control', 'motion', 'navigation', 'slam', 'vision']:
proto_anchor_link = '/appendix/apis/services/' + resource.replace('base_remote_control', 'base-rc') + '/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/' + resource.replace('base_remote_control', 'base-rc') + '/#' + proto_link
elif type == 'service' and resource == 'data_manager':
proto_anchor_link = '/appendix/apis/services/data/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/data/#' + proto_link
elif type == 'service' and resource == 'generic_service':
proto_anchor_link = '/appendix/apis/services/generic/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/generic/#' + proto_link
elif type == 'service' and resource == 'mlmodel':
proto_anchor_link = '/appendix/apis/services/ml/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/ml/#' + proto_link
elif type == 'app' and resource == 'app':
proto_anchor_link = '/appendix/apis/fleet/#' + proto_link
proto_anchor_link = '/dev/reference/apis/fleet/#' + proto_link
elif type == 'app' and resource in ["billing", "mltraining"]:
proto_anchor_link = '/appendix/apis/' + resource.replace('mltraining','ml-training') + '-client/#' + proto_link
proto_anchor_link = '/dev/reference/apis/' + resource.replace('mltraining','ml-training') + '-client/#' + proto_link
elif type == 'app' and resource in ["data", "dataset", "data_sync"]:
proto_anchor_link = '/appendix/apis/data-client/#' + proto_link
proto_anchor_link = '/dev/reference/apis/data-client/#' + proto_link
elif type == 'robot':
proto_anchor_link = '/appendix/apis/' + resource + '/#' + proto_link
proto_anchor_link = '/dev/reference/apis/' + resource + '/#' + proto_link

## Fetch just the first sentence from the proto_override_file (first text string terminated by '.\n'), ignoring hugo
## shortcodes like alerts ('{{%.*%}}.*{{% \[a-b].* %}}'), which precede some override files' (proto descriptions')
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/upload_tutorials.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@ async def main():
print("INSERTED")
print(insert_resp)

# Get how-tos from how-tos/typesense.json
with open('how-tos/typesense.json') as f:
resources = json.load(f)
for r in resources:
print("RESOURCE")
r["date"] = int(r["date"])
print(r)
r["last_updated"] = time_now
print(r)
insert_resp = typesense_client.collections['tutorials'].documents.upsert(r)
print("INSERTED")
print(insert_resp)

# Deleting documents that didn't get updated (presumably deleted)
try:
res = typesense_client.collections['tutorials'].documents.delete({'filter_by': 'last_updated: <' + str(time_now)})
Expand Down
Binary file modified assets/build/program/sdks/log-level-info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/js/howtos.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ let refinementLists = [customRefinementList({
items: [
{ label: "Data Management", value: "data" },
{ label: "Machine Learning", value: "ml" },
{ label: "Core", value: "core" },
{ label: "Control hardware", value: "core" },
{ label: "Fleet Management", value: "fleet" },
{ label: "Registry", value: "registry" },
{ label: "Integrate other hardware", value: "registry" },
{ label: "Mobility", value: "mobility" },
],
}),
Expand Down
20 changes: 17 additions & 3 deletions assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var siteMenuSubmenus = document.getElementsByClassName(
);

function submenuToggle(menu, toggle) {
console.log(menu)
let open = false;
if (toggle.children[0].className === "fas fa-chevron-right") {
open = true;
Expand All @@ -17,16 +18,29 @@ function submenuToggle(menu, toggle) {
}

// add or remove collapse class to children
let immediateChildren = menu.querySelector("ul").children;
let menuChildren = menu.querySelector("span>ul").children;
if (open) {
for (let c of immediateChildren) {
for (let c of menuChildren) {
c.classList.remove("collapse");
}
} else {
for (let c of immediateChildren) {
for (let c of menuChildren) {
c.classList.add("collapse");
}
}
let pageChildren = menu.querySelector("span>div>ul").children;
if (pageChildren) {
if (open) {
for (let c of pageChildren) {
c.classList.remove("collapse");
}
} else {
for (let c of pageChildren) {
c.classList.add("collapse");
}
}
}

}

for (let menu of siteMenuSubmenus) {
Expand Down
4 changes: 0 additions & 4 deletions assets/js/tutorials.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ const customRefinementList = instantsearch.connectors.connectRefinementList(
</ul>
<ul class="pill-explainer">
<li><p><strong>tutorial</strong>: Projects that show you how to use different parts of Viam.</p></li>
<li><p><strong>how-to</strong>: Step-by-step guides to complete tasks.</p></li>
<li><p><strong>quickstart</strong>: <5 min step-by-step guide to complete tasks.</p></li>
<li><p><strong>blogpost</strong>: Sample projects you can build.</p></li>
<li><p><strong>codelab</strong>: Community projects and example project.</p></li>
</ul>
Expand Down Expand Up @@ -215,8 +213,6 @@ search.addWidgets([
sortBy: ["name:asc"],
items: [
{ label: "tutorial" },
{ label: "how-to" },
{ label: "quickstart" },
{ label: "blogpost" },
{ label: "codelab" },
],
Expand Down
Binary file added assets/registry/restart-module.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 15 additions & 2 deletions assets/scss/_sidebar-tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
margin-right: -15px;
margin-left: -15px;
font-size: 1rem;
font-weight: 300;

@include media-breakpoint-up(md) {
@supports (position: sticky) {
Expand Down Expand Up @@ -63,7 +64,7 @@
a, .emptynode {
display: inline-block;
padding-bottom: 0.375rem;
color: black;
color: #333333;
text-decoration: none;

&:hover {
Expand Down Expand Up @@ -96,6 +97,7 @@

li i { // Layout of icons
padding-right: 0.5em;
-webkit-text-stroke: 1px whitesmoke;
&:before{
display: inline-block;
text-align: center;
Expand All @@ -112,7 +114,7 @@

.td-sidebar {
@include media-breakpoint-up(md) {
padding-top: 4rem;
padding-top: 6rem;
background-color: $td-sidebar-bg-color;
padding-right: 1rem;
border-right: 1px solid $td-sidebar-border-color;
Expand Down Expand Up @@ -170,4 +172,15 @@
li .indent {
font-size: 0.833rem;
padding-left: 0.75rem;
}

@media (min-width: 768px) {
.header-only > span > span.emptynode:hover {
color: #aaa;
}

.ul-2 > li:not(:last-child) {
padding-bottom: 8px;
border-bottom: 1px solid #ccc;
}
}
Loading
Loading