diff --git a/.github/workflows/generate-remotefolder-list.yml b/.github/workflows/generate-remotefolder-list.yml new file mode 100644 index 00000000..19dcf0bf --- /dev/null +++ b/.github/workflows/generate-remotefolder-list.yml @@ -0,0 +1,32 @@ +name: Generate Folder List + +on: + schedule: + - cron: '*/5 * * * *' # Runs at every 5th minute + workflow_dispatch: # Allows manual triggering + +jobs: + generate-and-commit-folder-list: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' # Use the Node.js version that matches your project requirements + + - name: Install dependencies + run: npm install + + - name: Run the script to fetch folders and generate the .tsx file + run: node .scripts/fetchFolders.js + + - name: Commit and push changes if there are any + run: | + git config --global user.email "your-email@example.com" + git config --global user.name "Your Name" + git add static/folderList.json + git commit -m "Automatically update folder list" -a || echo "No changes to commit" + git push diff --git a/.scripts/fetchFolders.js b/.scripts/fetchFolders.js new file mode 100644 index 00000000..f5760446 --- /dev/null +++ b/.scripts/fetchFolders.js @@ -0,0 +1,36 @@ +const fs = require('fs'); +const fetch = require('node-fetch'); + +const GITHUB_API_URL = 'https://api.github.com/repos'; +const REPO_OWNER = 'saviynt'; +const REPO_NAME = 'community-connectors'; +const BRANCH = 'main'; +// const TOKEN = 'your_github_token'; + +// const headers = { +// 'Authorization': `token ${TOKEN}` +// }; + +async function fetchFolders() { + const url = `${GITHUB_API_URL}/${REPO_OWNER}/${REPO_NAME}/contents?ref=${BRANCH}`; + const response = await fetch(url, { headers }); + const data = await response.json(); + + const directories = data.filter(item => item.type === 'dir').map(dir => ({ + name: dir.name, + readmeLink: `https://github.com/${REPO_OWNER}/${REPO_NAME}/blob/${BRANCH}/${dir.name}/README.md`, + srcLink: `https://github.com/${REPO_OWNER}/${REPO_NAME}/tree/${BRANCH}/${dir.name}/src`, + docsLink: `https://github.com/${REPO_OWNER}/${REPO_NAME}/tree/${BRANCH}/${dir.name}/docs`, + distLink: `https://github.com/${REPO_OWNER}/${REPO_NAME}/tree/${BRANCH}/${dir.name}/dist`, + })); + + generateJSONFile(directories); +} + +function generateJSONFile(folders) { + const content = JSON.stringify(folders, null, 2); + fs.writeFileSync('static/folderList.json', content); + console.log('folderList.json has been created/updated'); +} + +fetchFolders().catch(console.error); diff --git a/doc-templates/doc_template-1.md b/doc-templates/doc_template-1.md deleted file mode 100644 index 6fd932c8..00000000 --- a/doc-templates/doc_template-1.md +++ /dev/null @@ -1,259 +0,0 @@ -# Pandoc document template - -## Description - -This repository contains a simple template for building -[Pandoc](http://pandoc.org/) documents; Pandoc is a suite of tools to compile -markdown files into readable files (PDF, EPUB, HTML...). - -## Usage - -### Installing - -In order to use this makefile you will need to make sure that the following -dependencies are installed on your system: - - GNU make - - Pandoc - - LuaLaTeX - - DejaVu Sans fonts - -### Folder structure - -Here's a folder structure for a Pandoc document: - -``` -my-document/ # Root directory. -|- build/ # Folder used to store builded (output) files. -|- src/ # Markdowns files; one for each chapter. -|- images/ # Images folder. -|- metadata.yml # Metadata content (title, author...). -|- Makefile # Makefile used for building our documents. -``` - -### Setup generic data - -Edit the *metadata.yml* file to set configuration data: - -```yml ---- -title: My document title -author: Ralph Huwiler -rights: Creative Commons Attribution 4.0 International -language: en-US -tags: [document, my-document, etc] -abstract: | - Your summary text. ---- -``` - -You can find the list of all available keys on [this -page](http://pandoc.org/MANUAL.html#extension-yaml_metadata_block). - -### Creating chapters - -Creating a new chapter is as simple as creating a new markdown file in the -*src/* folder; you'll end up with something like this: - -``` -src/01-introduction.md -src/02-installation.md -src/03-usage.md -src/04-references.md -``` - -Pandoc and Make will join them automatically ordered by name; that's why the -numeric prefixes are being used. - -All you need to specify for each chapter at least one title: - -```md -# Introduction - -This is the first paragraph of the introduction chapter. - -## First - -This is the first subsection. - -## Second - -This is the second subsection. -``` - -Each title (*#*) will represent a chapter, while each subtitle (*##*) will -represent a chapter's section. You can use as many levels of sections as -markdown supports. - -#### Links between chapters - -Anchor links can be used to link chapters within the document: - -```md -// src/01-introduction.md -# Introduction - -For more information, check the [Usage] chapter. - -// src/02-installation.md -# Usage - -... -``` - -If you want to rename the reference, use this syntax: - -```md -For more information, check [this](#usage) chapter. -``` - -Anchor names should be downcased, and spaces, colons, semicolons... should be -replaced with hyphens. Instead of `Chapter title: A new era`, you have: -`#chapter-title-a-new-era`. - -#### Links between sections - -It's the same as anchor links: - -```md -# Introduction - -## First - -For more information, check the [Second] section. - -## Second - -... -``` - -Or, with al alternative name: - -```md -For more information, check [this](#second) section. -``` - -### Inserting objects - -Text. That's cool. What about images and tables? - -#### Insert an image - -Use Markdown syntax to insert an image with a caption: - -```md -![A cool seagull.](images/seagull.png) -``` - -Pandoc will automatically convert the image into a figure (image + caption). - -If you want to resize the image, you may use this syntax, available in Pandoc -1.16: - -```md -![A cool seagull.](images/seagull.png){ width=50% height=50% } -``` - -Also, to reference an image, use LaTeX labels: - -```md -Please, admire the gloriousnes of Figure \ref{seagull_image}. - -![A cool seagull.\label{seagull_image}](images/seagull.png) -``` - -#### Insert a table - -Use markdown table, and use the `Table: ` syntax to add -a caption: - -```md -| Index | Name | -| ----- | ---- | -| 0 | AAA | -| 1 | BBB | -| ... | ... | - -Table: This is an example table. -``` - -If you want to reference a table, use LaTeX labels: - -```md -Please, check Table /ref{example_table}. - -| Index | Name | -| ----- | ---- | -| 0 | AAA | -| 1 | BBB | -| ... | ... | - -Table: This is an example table.\label{example_table} -``` - -#### Insert an equation - -Wrap a LaTeX math equation between `$` delimiters for inline (tiny) formulas: - -```md -This, $\mu = \sum_{i=0}^{N} \frac{x_i}{N}$, the mean equation, ... -``` - -Pandoc will transform them automatically into images using online services. - -If you want to center the equation instead of inlining it, use double `$$` -delimiters: - -```md -$$\mu = \sum_{i=0}^{N} \frac{x_i}{N}$$ -``` - -[Here](https://www.codecogs.com/latex/eqneditor.php)'s an online equation -editor. - -### Output - -This template uses *Makefile* to automatize the building process. Instead of -using the *pandoc cli util*, we're going to use some *make* commands. - -#### Export to PDF - -Use this command: - -```sh -make pdf -``` - -The generated file will be placed in *build/pdf*. - -Please, note that PDF file generation requires some extra dependencies (~ 800 -MB): - -```sh -sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-latex-extra -``` - -#### Export to EPUB - -Use this command: - -```sh -make epub -``` - -The generated file will be placed in *build/epub*. - -#### Export to HTML - -Use this command: - -```sh -make html -``` - -The generated file(s) will be placed in *build/html*. - -## References - -- [Pandoc](http://pandoc.org/) -- [Pandoc Manual](http://pandoc.org/MANUAL.html) -- [Wikipedia: Markdown](http://wikipedia.org/wiki/Markdown) \ No newline at end of file diff --git a/doc-templates/readme_template.md b/doc-templates/readme_template.md deleted file mode 100644 index 1db99dae..00000000 --- a/doc-templates/readme_template.md +++ /dev/null @@ -1,62 +0,0 @@ -# Project Title - -Simple overview of use/purpose. - -## Description - -An in-depth paragraph about your project and overview of use. - -## Getting Started - -### Dependencies - -* Describe any prerequisites, libraries, OS version, etc., needed before installing program. -* ex. Windows 10 - -### Installing - -* How/where to download your program -* Any modifications needed to be made to files/folders - -### Executing program - -* How to run the program -* Step-by-step bullets -``` -code blocks for commands -``` - -## Help - -Any advise for common problems or issues. -``` -command to run if program contains helper info -``` - -## Authors - -Contributors names and contact info - -ex. Dominique Pizzie -ex. [@DomPizzie](https://twitter.com/dompizzie) - -## Version History - -* 0.2 - * Various bug fixes and optimizations - * See [commit change]() or See [release history]() -* 0.1 - * Initial Release - -## License - -This project is licensed under the [NAME HERE] License - see the LICENSE.md file for details - -## Acknowledgments - -Inspiration, code snippets, etc. -* [awesome-readme](https://github.com/matiassingers/awesome-readme) -* [PurpleBooth](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2) -* [dbader](https://github.com/dbader/readme-template) -* [zenorocha](https://gist.github.com/zenorocha/4526327) -* [fvcproductions](https://gist.github.com/fvcproductions/1bfc2d4aecb01a834b46) \ No newline at end of file diff --git a/docs/community/connectors.mdx b/docs/community/connectors.mdx index e69de29b..51fa55bd 100644 --- a/docs/community/connectors.mdx +++ b/docs/community/connectors.mdx @@ -0,0 +1,7 @@ +import FolderList from '@site/src/components/Github/GithubFoldersContent'; + +# My Dynamic Folders + +Here are the folders dynamically loaded: + +< /> diff --git a/docs/connectors/rest/build-rest-connector.mdx b/docs/connectors/rest/build-rest-connector.mdx deleted file mode 100644 index c94fb051..00000000 --- a/docs/connectors/rest/build-rest-connector.mdx +++ /dev/null @@ -1,421 +0,0 @@ ---- -sidebar_position: 1 -hide_title: true -sidebar_label: Build a REST Connector -title: Overview -slug: /connectors/rest/ -image: https://docusaurus-openapi.tryingpan.dev/img/docusaurus-openapi-docs-logo.svg -tags: - - documentation - - openapi - - getting started - - quickstart ---- - - - - - -
- -
- -
- -OpenAPI plugin for generating API reference docs in Docusaurus v2. - - -

- -[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/blob/HEAD/LICENSE) [![npm latest package](https://img.shields.io/npm/v/docusaurus-plugin-openapi-docs/latest.svg)](https://www.npmjs.com/package/docusaurus-plugin-openapi-docs) [![npm downloads](https://img.shields.io/npm/dm/docusaurus-plugin-openapi-docs.svg)](https://www.npmjs.com/package/docusaurus-plugin-openapi-docs) [![npm canary package](https://img.shields.io/npm/v/docusaurus-plugin-openapi-docs/canary.svg)](https://www.npmjs.com/package/docusaurus-plugin-openapi-docs) [![npm beta package](https://img.shields.io/npm/v/docusaurus-plugin-openapi-docs/beta.svg)](https://www.npmjs.com/package/docusaurus-plugin-openapi-docs) - - -