Skip to content

Commit

Permalink
Add dynamic loading
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavs-0 committed Oct 25, 2024
1 parent 9406c0f commit 882d53f
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 3 deletions.
14 changes: 13 additions & 1 deletion docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
- [Home](/)
- Jetson
- [MQTT](jetson/mqtt.md)
- [MQTT](jetson/mqtt.md)
- Computer Vision
- [ARV Scene Perception](cv/scene_perception.md)
- [YOLO Stack](cv/yolo_stack.md)
- [Onboarding](cv/onboarding.md)
- Embedded
- [Stack](embedded/stack.md)
- Navigation
- [Nav Stack](nav/nav_stack.md)
- [Simulation](nav/simulation.md)
- [Onboarding](nav/onboarding.md)
- Sensors
- [Onboarding](sensors/onboarding.md)
1 change: 1 addition & 0 deletions docs/cv/onboarding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Placeholder -->
1 change: 1 addition & 0 deletions docs/cv/scene_perception.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Placeholder -->
1 change: 1 addition & 0 deletions docs/cv/yolo_stack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Placeholder -->
44 changes: 44 additions & 0 deletions docs/docsify-plugin-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
(function () {
var test = function (hook, vm) {
hook.beforeEach(function (markdown, next) {
const filesMap = {
'#/cv/scene_perception': 'https://raw.githubusercontent.com/umigv/UMARV-CV-ScenePerception/main/README.md',
'#/cv/yolo_stack': 'https://raw.githubusercontent.com//umigv/yolo_stack/main/README.md',
'#/cv/onboarding': 'https://raw.githubusercontent.com/umigv/CV-Onboarding/main/README.md',
'#/nav/nav_stack': 'https://raw.githubusercontent.com/umigv/nav_stack/main/README.md',
'#/nav/onboarding': 'https://raw.githubusercontent.com/umigv/nav-onboarding-2024/main/README.md',
'#/nav/simulation': 'https://raw.githubusercontent.com/umigv/simulation_stack/main/README.md',
'#/embedded/stack': 'https://raw.githubusercontent.com/umigv/Embedded_Stack_ROS2/master/Readme.md',
'#/sensors/onboarding': 'https://raw.githubusercontent.com/umigv/sensors-onboarding/main/README.md',
};

try {
const url = filesMap[window.location.hash];
if (url) {
fetch(url)
.then(response => response.text())
.then(text => {
console.log('Loaded', url);
next(markdown + text);
})
.catch(error => {
console.error('Error:', error);
next(markdown);
});
}

} catch (e) {
console.error(e);
} finally {
next(markdown);
}
});

hook.afterEach(function (html, next) {
next(html);
});
};

$docsify = $docsify || {};
$docsify.plugins = [].concat(test, $docsify.plugins || []);
})();
1 change: 1 addition & 0 deletions docs/embedded/stack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Placeholder -->
6 changes: 4 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@
borderColor: '#f0f0f0',
sidebarSublink: '#1e1e1e',
blockQuoteColor: '#1e1e1e',
}
},
}
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="./docsify-plugin-test.js"></script>
<script
src="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/index.min.js"
type="text/javascript">
type="text/javascript"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
</script>
</body>
</html>
1 change: 1 addition & 0 deletions docs/nav/nav_stack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Placeholder -->
1 change: 1 addition & 0 deletions docs/nav/onboarding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Placeholder -->
1 change: 1 addition & 0 deletions docs/nav/simulation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Placeholder -->
1 change: 1 addition & 0 deletions docs/sensors/onboarding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Placeholder -->

0 comments on commit 882d53f

Please sign in to comment.