404
+ +Page not found
+ + +diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..1a5dc0f --- /dev/null +++ b/404.html @@ -0,0 +1,113 @@ + + +
+ + + + +Page not found
+ + +An organization committed to developing pmod modules, embodying an libre / open-source approach where designs are freely shared, allowing unrestricted access, modifications, and collaboration.
+ +Welcome to our project! This guide provides step-by-step instructions on how to contribute to various types of module repositories within our organization. For this example, we will reference the pmods
repository, but the same process applies to other module repositories.
Each repository (e.g., pmods
) is dedicated to a specific type of module. Within these repositories, there is a modules
directory. Your contribution should be placed in a separate folder inside this modules
directory.
Ensure you select the correct repository for the type of module you are contributing.
+pmods
) on GitHub and click the "Fork" button to create a copy under your GitHub account.Create a New Folder: Inside the modules
directory, create a new folder for your module. The folder name should be descriptive of your module.
Develop Your Module: Add your module files to this new folder. This might include source code, design files, images, etc.
+.md
) file that describes your module. This documentation should include:Use Tags: At the beginning or end of your markdown file, include relevant tags that describe your module. Tags help categorize and make your module easily searchable.
+For instance: Tags: Robotics, Sensor, Wireless
The file should be called README.md
.
Push Your Changes: Push your changes to your forked repository.
+Create a Pull Request: Go to your forked repository on GitHub and click "New pull request." Target the main branch of the original repository. Fill in a descriptive title and description for your pull request.
+Hello! To learn more what this project is about, visit the about page.
+ +' + escapeHtml(summary) +'
' + noResultsText + '
'); + } +} + +function doSearch () { + var query = document.getElementById('mkdocs-search-query').value; + if (query.length > min_search_length) { + if (!window.Worker) { + displayResults(search(query)); + } else { + searchWorker.postMessage({query: query}); + } + } else { + // Clear results for short queries + displayResults([]); + } +} + +function initSearch () { + var search_input = document.getElementById('mkdocs-search-query'); + if (search_input) { + search_input.addEventListener("keyup", doSearch); + } + var term = getSearchTermFromLocation(); + if (term) { + search_input.value = term; + doSearch(); + } +} + +function onWorkerMessage (e) { + if (e.data.allowSearch) { + initSearch(); + } else if (e.data.results) { + var results = e.data.results; + displayResults(results); + } else if (e.data.config) { + min_search_length = e.data.config.min_search_length-1; + } +} + +if (!window.Worker) { + console.log('Web Worker API not supported'); + // load index in main thread + $.getScript(joinUrl(base_url, "search/worker.js")).done(function () { + console.log('Loaded worker'); + init(); + window.postMessage = function (msg) { + onWorkerMessage({data: msg}); + }; + }).fail(function (jqxhr, settings, exception) { + console.error('Could not load worker.js'); + }); +} else { + // Wrap search in a web worker + var searchWorker = new Worker(joinUrl(base_url, "search/worker.js")); + searchWorker.postMessage({init: true}); + searchWorker.onmessage = onWorkerMessage; +} diff --git a/search/search_index.json b/search/search_index.json new file mode 100644 index 0000000..6d157f4 --- /dev/null +++ b/search/search_index.json @@ -0,0 +1 @@ +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"LibreMods Docs Hello! To learn more what this project is about, visit the about page .","title":"Home"},{"location":"#libremods-docs","text":"Hello! To learn more what this project is about, visit the about page .","title":"LibreMods Docs"},{"location":"about/","text":"About An organization committed to developing pmod modules, embodying an libre / open-source approach where designs are freely shared, allowing unrestricted access, modifications, and collaboration.","title":"About"},{"location":"about/#about","text":"An organization committed to developing pmod modules, embodying an libre / open-source approach where designs are freely shared, allowing unrestricted access, modifications, and collaboration.","title":"About"},{"location":"contributing/","text":"Guide to Contributing Modules Welcome to our project! This guide provides step-by-step instructions on how to contribute to various types of module repositories within our organization. For this example, we will reference the pmods repository, but the same process applies to other module repositories. Step 1: Understand the Repository Structure Each repository (e.g., pmods ) is dedicated to a specific type of module. Within these repositories, there is a modules directory. Your contribution should be placed in a separate folder inside this modules directory. Ensure you select the correct repository for the type of module you are contributing. Step 2: Fork and Clone the Repository Fork the Repository : Navigate to the repository (e.g., pmods ) on GitHub and click the \"Fork\" button to create a copy under your GitHub account. Clone Your Fork : Clone the forked repository to your local machine. Step 3: Create Your Module Create a New Folder : Inside the modules directory, create a new folder for your module. The folder name should be descriptive of your module. Develop Your Module : Add your module files to this new folder. This might include source code, design files, images, etc. Step 4: Document Your Module Create a Markdown File : Inside your module's folder, create a markdown ( .md ) file that describes your module. This documentation should include: The purpose and functionality of the module. Instructions on how to use the module. Any other relevant information or references. Use Tags: At the beginning or end of your markdown file, include relevant tags that describe your module. Tags help categorize and make your module easily searchable. For instance: Tags: Robotics, Sensor, Wireless The file should be called README.md . Step 5: Commit Your Changes Step 6: Push and Create a Pull Request Push Your Changes : Push your changes to your forked repository. Create a Pull Request : Go to your forked repository on GitHub and click \"New pull request.\" Target the main branch of the original repository. Fill in a descriptive title and description for your pull request. Include a concise yet descriptive title and summary for your PR. Remember, each PR must pass automated checks and will be reviewed by an authorized reviewer. Step 7: Respond to Feedback Once your pull request is submitted, it may be reviewed and you might receive feedback. Be prepared to make revisions if necessary. Step 8: PR Merges and Contributions If your PR meets the required standards and passes the review, it will be merged into the repository. Congratulations, you have successfully contributed a module!","title":"Contributing"},{"location":"contributing/#guide-to-contributing-modules","text":"Welcome to our project! This guide provides step-by-step instructions on how to contribute to various types of module repositories within our organization. For this example, we will reference the pmods repository, but the same process applies to other module repositories.","title":"Guide to Contributing Modules"},{"location":"contributing/#step-1-understand-the-repository-structure","text":"Each repository (e.g., pmods ) is dedicated to a specific type of module. Within these repositories, there is a modules directory. Your contribution should be placed in a separate folder inside this modules directory. Ensure you select the correct repository for the type of module you are contributing.","title":"Step 1: Understand the Repository Structure"},{"location":"contributing/#step-2-fork-and-clone-the-repository","text":"Fork the Repository : Navigate to the repository (e.g., pmods ) on GitHub and click the \"Fork\" button to create a copy under your GitHub account. Clone Your Fork : Clone the forked repository to your local machine.","title":"Step 2: Fork and Clone the Repository"},{"location":"contributing/#step-3-create-your-module","text":"Create a New Folder : Inside the modules directory, create a new folder for your module. The folder name should be descriptive of your module. Develop Your Module : Add your module files to this new folder. This might include source code, design files, images, etc.","title":"Step 3: Create Your Module"},{"location":"contributing/#step-4-document-your-module","text":"Create a Markdown File : Inside your module's folder, create a markdown ( .md ) file that describes your module. This documentation should include: The purpose and functionality of the module. Instructions on how to use the module. Any other relevant information or references. Use Tags: At the beginning or end of your markdown file, include relevant tags that describe your module. Tags help categorize and make your module easily searchable. For instance: Tags: Robotics, Sensor, Wireless The file should be called README.md .","title":"Step 4: Document Your Module"},{"location":"contributing/#step-5-commit-your-changes","text":"","title":"Step 5: Commit Your Changes"},{"location":"contributing/#step-6-push-and-create-a-pull-request","text":"Push Your Changes : Push your changes to your forked repository. Create a Pull Request : Go to your forked repository on GitHub and click \"New pull request.\" Target the main branch of the original repository. Fill in a descriptive title and description for your pull request. Include a concise yet descriptive title and summary for your PR. Remember, each PR must pass automated checks and will be reviewed by an authorized reviewer.","title":"Step 6: Push and Create a Pull Request"},{"location":"contributing/#step-7-respond-to-feedback","text":"Once your pull request is submitted, it may be reviewed and you might receive feedback. Be prepared to make revisions if necessary.","title":"Step 7: Respond to Feedback"},{"location":"contributing/#step-8-pr-merges-and-contributions","text":"If your PR meets the required standards and passes the review, it will be merged into the repository. Congratulations, you have successfully contributed a module!","title":"Step 8: PR Merges and Contributions"}]} \ No newline at end of file diff --git a/search/worker.js b/search/worker.js new file mode 100644 index 0000000..8628dbc --- /dev/null +++ b/search/worker.js @@ -0,0 +1,133 @@ +var base_path = 'function' === typeof importScripts ? '.' : '/search/'; +var allowSearch = false; +var index; +var documents = {}; +var lang = ['en']; +var data; + +function getScript(script, callback) { + console.log('Loading script: ' + script); + $.getScript(base_path + script).done(function () { + callback(); + }).fail(function (jqxhr, settings, exception) { + console.log('Error: ' + exception); + }); +} + +function getScriptsInOrder(scripts, callback) { + if (scripts.length === 0) { + callback(); + return; + } + getScript(scripts[0], function() { + getScriptsInOrder(scripts.slice(1), callback); + }); +} + +function loadScripts(urls, callback) { + if( 'function' === typeof importScripts ) { + importScripts.apply(null, urls); + callback(); + } else { + getScriptsInOrder(urls, callback); + } +} + +function onJSONLoaded () { + data = JSON.parse(this.responseText); + var scriptsToLoad = ['lunr.js']; + if (data.config && data.config.lang && data.config.lang.length) { + lang = data.config.lang; + } + if (lang.length > 1 || lang[0] !== "en") { + scriptsToLoad.push('lunr.stemmer.support.js'); + if (lang.length > 1) { + scriptsToLoad.push('lunr.multi.js'); + } + if (lang.includes("ja") || lang.includes("jp")) { + scriptsToLoad.push('tinyseg.js'); + } + for (var i=0; i < lang.length; i++) { + if (lang[i] != 'en') { + scriptsToLoad.push(['lunr', lang[i], 'js'].join('.')); + } + } + } + loadScripts(scriptsToLoad, onScriptsLoaded); +} + +function onScriptsLoaded () { + console.log('All search scripts loaded, building Lunr index...'); + if (data.config && data.config.separator && data.config.separator.length) { + lunr.tokenizer.separator = new RegExp(data.config.separator); + } + + if (data.index) { + index = lunr.Index.load(data.index); + data.docs.forEach(function (doc) { + documents[doc.location] = doc; + }); + console.log('Lunr pre-built index loaded, search ready'); + } else { + index = lunr(function () { + if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) { + this.use(lunr[lang[0]]); + } else if (lang.length > 1) { + this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility + } + this.field('title'); + this.field('text'); + this.ref('location'); + + for (var i=0; i < data.docs.length; i++) { + var doc = data.docs[i]; + this.add(doc); + documents[doc.location] = doc; + } + }); + console.log('Lunr index built, search ready'); + } + allowSearch = true; + postMessage({config: data.config}); + postMessage({allowSearch: allowSearch}); +} + +function init () { + var oReq = new XMLHttpRequest(); + oReq.addEventListener("load", onJSONLoaded); + var index_path = base_path + '/search_index.json'; + if( 'function' === typeof importScripts ){ + index_path = 'search_index.json'; + } + oReq.open("GET", index_path); + oReq.send(); +} + +function search (query) { + if (!allowSearch) { + console.error('Assets for search still loading'); + return; + } + + var resultDocuments = []; + var results = index.search(query); + for (var i=0; i < results.length; i++){ + var result = results[i]; + doc = documents[result.ref]; + doc.summary = doc.text.substring(0, 200); + resultDocuments.push(doc); + } + return resultDocuments; +} + +if( 'function' === typeof importScripts ) { + onmessage = function (e) { + if (e.data.init) { + init(); + } else if (e.data.query) { + postMessage({ results: search(e.data.query) }); + } else { + console.error("Worker - Unrecognized message: " + e); + } + }; +} diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..e5751a9 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,18 @@ + +