Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

fix: update cms config #98

Merged
merged 2 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 0 additions & 36 deletions src/configs/cms/collections/deriv-api.collection.ts

This file was deleted.

54 changes: 0 additions & 54 deletions src/configs/cms/collections/frameworks.collection.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/configs/cms/collections/guides.collection.ts

This file was deleted.

56 changes: 48 additions & 8 deletions src/configs/cms/collections/index.ts
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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,
];
Expand Down
43 changes: 0 additions & 43 deletions src/configs/cms/collections/languages.collection.ts

This file was deleted.

18 changes: 6 additions & 12 deletions src/configs/cms/collections/singlepages.collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,16 @@ 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',
file: 'docs/languages/intro.md',
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],
},
{
Expand All @@ -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],
},
],
Expand Down
26 changes: 5 additions & 21 deletions src/configs/cms/constants/index.ts
Original file line number Diff line number Diff line change
@@ -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';
1 change: 0 additions & 1 deletion src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ body {
}

aside.theme-doc-sidebar-container {
height: 100vh;
width: rem(28.3);
}

Expand Down