Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
6 changes: 6 additions & 0 deletions .changeset/three-sheep-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@microfox/tracker': patch
'microfox': patch
---

minor fixes in tracker workflow creation
33 changes: 33 additions & 0 deletions .github/workflows/trackers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Automated Trackers
'on':
push:
branches:
- main
jobs:
sync-micro-sdks-documentation:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.ORG_PAT }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Dependencies
run: npm install
- name: Run Tracker
run: npx microfox track --file ./__track__/sync-sdk-docs.tracker.ts
- name: Commit and Push Changes
run: |-
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
if git diff --staged --quiet; then
echo "No changes to commit."
else
git commit -m "docs: Sync Micro SDKs documentation"
git push
fi
78 changes: 78 additions & 0 deletions docs/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// console.log("--- Custom script loaded ---");
// document.body.style.border = "2px solid red";

// function setPackageNav() {
// console.log("setPackageNav called");
// const sidebarContent = document.getElementById('sidebar-content');
// if (!sidebarContent) {
// requestAnimationFrame(setPackageNav);
// return;
// }

// const currentPath = window.location.pathname;
// console.log("Current path:", currentPath);
// const microSdksPathRegex = /^\/micro-sdks\/([^\/]+)/;
// const match = currentPath.match(microSdksPathRegex);

// // Restore original sidebar if it exists
// if (window.originalSidebarHTML) {
// sidebarContent.innerHTML = window.originalSidebarHTML;
// } else {
// window.originalSidebarHTML = sidebarContent.innerHTML;
// }

// if (match && match[1] && match[1] !== 'index') {
// const packageNameSlug = match[1];
// console.log("Package name slug:", packageNameSlug);

// const listItems = sidebarContent.querySelectorAll('li[data-title]');
// let targetListItem = null;

// listItems.forEach(li => {
// const dataTitle = li.getAttribute('data-title').toLowerCase().replace(/\s/g, '-');
// if (dataTitle === packageNameSlug) {
// targetListItem = li;
// }
// });

// if (targetListItem) {
// console.log("Found target list item:", targetListItem);
// const packageNavContent = targetListItem.querySelector('ul');
// if (packageNavContent) {
// sidebarContent.innerHTML = '';
// sidebarContent.appendChild(packageNavContent.cloneNode(true));
// }
// } else {
// console.log("No target list item found for slug:", packageNameSlug);
// }
// }
// }

// // --- Observer logic ---
// let currentPath = window.location.pathname;
// function observeDOM() {
// const observer = new MutationObserver(() => {
// if (window.location.pathname !== currentPath) {
// currentPath = window.location.pathname;
// setPackageNav();
// }
// });

// const bodyNode = document.body;
// if (bodyNode) {
// observer.observe(document.body, { childList: true, subtree: true });
// }
// }

// if (document.readyState === 'loading') {
// document.addEventListener('DOMContentLoaded', () => {
// setPackageNav();
// observeDOM();
// });
// } else {
// setPackageNav();
// observeDOM();
// }

// // To remove the debug border later:
// // document.body.style.border = "none";
Loading