Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

singnet/dev-portal

Repository files navigation

Welcome to the SingularityNET Developer Portal

Our Developer Portal provides documentation about the main products of SingularityNET

Contributing

We are glad to see new contributors! If you want to add a new document or request any edits, please:

  1. Create a fork of this repo
  2. Open the pull request to development branch with your edits

Setup

For start development you need:

  • node 18.0.0 || >=20.0.0
  • npm >=8.0.0

Copy repository:

git clone https://github.com/singnet/dev-portal.git
cd dev-portal

then install dependencies:

npm install

and run project:

npm run dev

Update/Add Documents

If you want to update the documentation, change the corresponding files in /docs/products/. To add documentation files, place them in the appropriate product section and do not forget to add them to the sidebar (add the data to the /config/content/sidebarContentConfig.ts to the appropriate section). If a new documentation page requires images, add them to the appropriate folder in /assets/images/

Dev-portal-2 uses a library module with clean-URLs and for its correct operation it is necessary to store documents correctly.

Add all documents in individual folders and the entry point must be a file index.md As shown in the diagram:

+- getting-started
| +- index.md
+- installation
| +- index.md
+- index.md

If there are other files inside the folder, except index.md then the name of this folder should start with a capital letter. Otherwise, with lowercase.

Add an image

To add an image to your document, please follow these steps:

  1. Upload the file to public/assets/images/products/name_of_product/name_of_subcategory/title_image
  2. Add next code:
"><ImageViewer
src='/assets/images/products/path_to_your_file'
alt='alt for image'
/>

If you want to add a description to an image, you should use the pictureTitle attribute. For example:

"><ImageViewer
src='/assets/images/products/AIMarketplace/Marketplace/BasicScheme.webp'
alt='Basic scheme'
pictureTitle='Basic scheme'
/>

Result:

Add a video

To add a video to your document, please follow these steps:

  1. Upload the file to public/assets/images/products/name_of_product/name_of_subcategory/title_image
  2. Add next code:
"><Video src="'/assets/images/products/path_to_your_file'" />

Add new component

If you want to add a new one .vue component, you need to add these files to the appropriate folder in the /components/ section or create a new folder if the existing ones are not suitable. Do not forget import new components in /.vitepress/theme/index.ts

Example:

...
import YourComponent from "/components/folder/YourComponent.vue";

export default {
...
enhanceApp({ app, router, siteData }) {
app.component("YourComponent", YourComponent);
...
},
}

The default theme's component has a few slots that can be used to inject content at certain locations of the page. Check full list of slots here: https://vitepress.dev/guide/extending-default-theme#layout-slots

export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
"some-layout": () => h(YourComponent)
...
});
},
...
}

Using the Accordion

To use the Accordion element, use the following syntax

<AccordionItem :id="idHere">
<template #title>
title here
template>
<template #description>
content here
template>
AccordionItem>
  • To create an anchor link to an object, set the value of the parameter :id;
  • Use the