diff --git a/src/configs/cms/collections/deriv-api.collection.ts b/src/configs/cms/collections/deriv-api.collection.ts deleted file mode 100644 index 3a393639..00000000 --- a/src/configs/cms/collections/deriv-api.collection.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { - FLUTTER_CLIENT_COLLECTION_NAME, - PYTHON_CLIENT_COLLECTION_NAME, - TS_CLIENT_COLLECTION_NAME, -} from '../constants'; -import DocCollection from './docs-collection.class'; -import { CmsCollection } from 'netlify-cms-core'; - -const typescript_client_collection: CmsCollection = new DocCollection( - TS_CLIENT_COLLECTION_NAME, - 'Typescript Client Documentations', - 'Typescript Client Documentation', - 'docs/deriv-api/typescript', -); - -const python_client_collection: CmsCollection = new DocCollection( - PYTHON_CLIENT_COLLECTION_NAME, - 'Python Client Documentations', - 'Python Client Documentation', - 'docs/deriv-api/python', -); - -const flutter_client_collection: CmsCollection = new DocCollection( - FLUTTER_CLIENT_COLLECTION_NAME, - 'Flutter Client Documentations', - 'Flutter Client Documentation', - 'docs/deriv-api/flutter', -); - -const derivapi_clients_collection = [ - typescript_client_collection, - python_client_collection, - flutter_client_collection, -]; - -export default derivapi_clients_collection; diff --git a/src/configs/cms/collections/frameworks.collection.ts b/src/configs/cms/collections/frameworks.collection.ts deleted file mode 100644 index 3f73ca7e..00000000 --- a/src/configs/cms/collections/frameworks.collection.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - ANGULAR_FRAMEWORK_COLLECTION_NAME, - REACT_FRAMEWORK_COLLECTION_NAME, - SOLIDJS_FRAMEWORK_COLLECTION_NAME, - SVELTE_FRAMEWORK_COLLECTION_NAME, - VUE_FRAMEWORK_COLLECTION_NAME, -} from '../constants'; -import DocCollection from './docs-collection.class'; -import { CmsCollection } from 'netlify-cms-core'; - -const react_framework_collection: CmsCollection = new DocCollection( - REACT_FRAMEWORK_COLLECTION_NAME, - 'React Documentations', - 'React Documentation', - 'docs/frameworks/react', -); - -const angular_framework_collection: CmsCollection = new DocCollection( - ANGULAR_FRAMEWORK_COLLECTION_NAME, - 'Angular Documentations', - 'Angular Documentation', - 'docs/frameworks/angular', -); - -const solidjs_framework_collection: CmsCollection = new DocCollection( - SOLIDJS_FRAMEWORK_COLLECTION_NAME, - 'Solidjs Documentations', - 'Solidjs Documentation', - 'docs/frameworks/solidjs', -); - -const svelte_framework_collection: CmsCollection = new DocCollection( - SVELTE_FRAMEWORK_COLLECTION_NAME, - 'Svelte Documentations', - 'Svelte Documentation', - 'docs/frameworks/svelte', -); - -const vue_framework_collection: CmsCollection = new DocCollection( - VUE_FRAMEWORK_COLLECTION_NAME, - 'Vue Documentations', - 'Vue Documentation', - 'docs/frameworks/vue', -); - -const frameworks_collections = [ - react_framework_collection, - angular_framework_collection, - solidjs_framework_collection, - svelte_framework_collection, - vue_framework_collection, -]; - -export default frameworks_collections; diff --git a/src/configs/cms/collections/guides.collection.ts b/src/configs/cms/collections/guides.collection.ts deleted file mode 100644 index 42cf9d8d..00000000 --- a/src/configs/cms/collections/guides.collection.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { GUIDES_COLLECTION_NAME } from '../constants'; -import DocCollection from './docs-collection.class'; -import { CmsCollection } from 'netlify-cms-core'; - -const guides_collection: CmsCollection = new DocCollection( - GUIDES_COLLECTION_NAME, - 'Guides Documentations', - 'Guide Documentation', - 'docs/guides', -); - -export default guides_collection; diff --git a/src/configs/cms/collections/index.ts b/src/configs/cms/collections/index.ts index 17e0fcc6..1bfae66f 100644 --- a/src/configs/cms/collections/index.ts +++ b/src/configs/cms/collections/index.ts @@ -1,10 +1,14 @@ import type { CmsCollection } from 'netlify-cms-core'; -import { CONCEPTS_COLLECTION_NAME, FAQ_POST_COLLECTION_NAME } from '../constants'; -import derivapi_clients_collection from './deriv-api.collection'; +import { + CLIENT_LIBRARIES_COLLECTION_NAME, + CONCEPTS_COLLECTION_NAME, + FAQ_POST_COLLECTION_NAME, + FRAMEWORKS_COLLECTION_NAME, + GUIDES_COLLECTION_NAME, + LANGUAGES_COLLECTION_NAME, + TERMINOLOGY_COLLECTION_NAME, +} from '../constants'; import DocCollection from './docs-collection.class'; -import frameworks_collections from './frameworks.collection'; -import guides_collection from './guides.collection'; -import languages_collections from './languages.collection'; import SinglePagesCollection from './singlepages.collection'; const faq_collection: CmsCollection = new DocCollection( @@ -21,12 +25,48 @@ const core_concepts_collection: CmsCollection = new DocCollection( 'docs/core-concepts', ); +const terminology_collection: CmsCollection = new DocCollection( + TERMINOLOGY_COLLECTION_NAME, + 'Terminologies', + 'Terminology', + 'docs/terminology', +); + +const languages_collection: CmsCollection = new DocCollection( + LANGUAGES_COLLECTION_NAME, + 'Languages', + 'Language', + 'docs/languages', +); + +const frameworks_collection: CmsCollection = new DocCollection( + FRAMEWORKS_COLLECTION_NAME, + 'Frameworks', + 'Framework', + 'docs/frameworks', +); + +const client_libraries_collection: CmsCollection = new DocCollection( + CLIENT_LIBRARIES_COLLECTION_NAME, + 'Client Libraries', + 'Client Librariy', + 'docs/client-libraries', +); + +const guides_collection: CmsCollection = new DocCollection( + GUIDES_COLLECTION_NAME, + 'Guides', + 'Guide', + 'docs/guides', +); + const cms_collections: CmsCollection[] = [ SinglePagesCollection, + terminology_collection, core_concepts_collection, - ...languages_collections, - ...frameworks_collections, - ...derivapi_clients_collection, + languages_collection, + frameworks_collection, + client_libraries_collection, guides_collection, faq_collection, ]; diff --git a/src/configs/cms/collections/languages.collection.ts b/src/configs/cms/collections/languages.collection.ts deleted file mode 100644 index c9b03fbf..00000000 --- a/src/configs/cms/collections/languages.collection.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { - DART_LANG_COLLECTION_NAME, - JS_LANG_COLLECTION_NAME, - PYTHON_LANG_COLLECTION_NAME, - TS_LANG_COLLECTION_NAME, -} from '../constants'; -import DocCollection from './docs-collection.class'; -import { CmsCollection } from 'netlify-cms-core'; - -const js_lang_collection: CmsCollection = new DocCollection( - JS_LANG_COLLECTION_NAME, - 'Javascript Documentations', - 'Javascript Documentation', - 'docs/languages/javascript', -); - -const ts_lang_collection: CmsCollection = new DocCollection( - TS_LANG_COLLECTION_NAME, - 'Typescript Documentations', - 'Typescript Documentation', - 'docs/languages/typescript', -); -const dart_lang_collection: CmsCollection = new DocCollection( - DART_LANG_COLLECTION_NAME, - 'Dart Documentations', - 'Dart Documentation', - 'docs/languages/dart', -); - -const python_lang_collection: CmsCollection = new DocCollection( - PYTHON_LANG_COLLECTION_NAME, - 'Python Documentations', - 'Python Documentation', - 'docs/languages/python', -); - -const languages_collections = [ - js_lang_collection, - ts_lang_collection, - dart_lang_collection, - python_lang_collection, -]; -export default languages_collections; diff --git a/src/configs/cms/collections/singlepages.collection.ts b/src/configs/cms/collections/singlepages.collection.ts index ddf5d1fd..e5977676 100644 --- a/src/configs/cms/collections/singlepages.collection.ts +++ b/src/configs/cms/collections/singlepages.collection.ts @@ -12,12 +12,6 @@ const SinglePagesCollection: CmsCollection = { file: 'docs/intro.md', fields: [...default_doc_fields], }, - { - name: 'app_reg', - label: 'Application Setup', - file: 'docs/application_setup.md', - fields: [...default_doc_fields], - }, { name: 'language-intro', label: 'Language Introduction', @@ -25,9 +19,9 @@ const SinglePagesCollection: CmsCollection = { fields: [...default_doc_fields], }, { - name: 'dervi-api-intro', - label: 'Deriv API Introduction', - file: 'docs/deriv-api/intro.md', + name: 'client-libraries-intro', + label: 'Client Libraries Introduction', + file: 'docs/client-libraries/intro.md', fields: [...default_doc_fields], }, { @@ -37,9 +31,9 @@ const SinglePagesCollection: CmsCollection = { fields: [...default_doc_fields], }, { - name: 'guides-intro', - label: 'Guides Introduction', - file: 'docs/guides/intro.md', + name: 'app_reg', + label: 'Application Setup', + file: 'docs/application_setup.md', fields: [...default_doc_fields], }, ], diff --git a/src/configs/cms/constants/index.ts b/src/configs/cms/constants/index.ts index 8bab60f8..73aeca2c 100644 --- a/src/configs/cms/constants/index.ts +++ b/src/configs/cms/constants/index.ts @@ -1,24 +1,8 @@ export const BLOG_POST_COLLECTION_NAME = 'blog-post'; export const FAQ_POST_COLLECTION_NAME = 'faqs'; export const CONCEPTS_COLLECTION_NAME = 'concepts'; - -// LANGUAGES -export const JS_LANG_COLLECTION_NAME = 'js-lang-docs'; -export const TS_LANG_COLLECTION_NAME = 'ts-lang-docs'; -export const DART_LANG_COLLECTION_NAME = 'dart-lang-docs'; -export const PYTHON_LANG_COLLECTION_NAME = 'python-lang-docs'; - -// FRAMEWORKS -export const REACT_FRAMEWORK_COLLECTION_NAME = 'react-framework-docs'; -export const ANGULAR_FRAMEWORK_COLLECTION_NAME = 'angular-framework-docs'; -export const SOLIDJS_FRAMEWORK_COLLECTION_NAME = 'solidjs-framework-docs'; -export const SVELTE_FRAMEWORK_COLLECTION_NAME = 'svelte-framework-docs'; -export const VUE_FRAMEWORK_COLLECTION_NAME = 'vue-framework-docs'; - -// CLIENTS -export const TS_CLIENT_COLLECTION_NAME = 'ts-client-docs'; -export const PYTHON_CLIENT_COLLECTION_NAME = 'python-client-docs'; -export const FLUTTER_CLIENT_COLLECTION_NAME = 'flutter-client-docs'; - -// GUIDES -export const GUIDES_COLLECTION_NAME = 'guides-docs'; +export const TERMINOLOGY_COLLECTION_NAME = 'terminology'; +export const LANGUAGES_COLLECTION_NAME = 'languages'; +export const FRAMEWORKS_COLLECTION_NAME = 'frameworks'; +export const CLIENT_LIBRARIES_COLLECTION_NAME = 'clientlibraries'; +export const GUIDES_COLLECTION_NAME = 'guides'; diff --git a/src/styles/index.scss b/src/styles/index.scss index 6c4889ab..cd1cd5f5 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -139,7 +139,6 @@ body { } aside.theme-doc-sidebar-container { - height: 100vh; width: rem(28.3); }