Skip to content

Commit

Permalink
feat: Implemented remark for parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Aug 23, 2023
1 parent ace1b92 commit 0fbd332
Show file tree
Hide file tree
Showing 109 changed files with 16,792 additions and 9,952 deletions.
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"tag": "next",
"initialVersions": {
"typedoc-plugin-markdown": "3.15.1",
"typedoc-plugin-remark": "0.0.0",
"docusaurus-plugin-typedoc": "0.18.0",
"typedoc-vitepress-theme": "0.0.0",
"typedoc-github-wiki-theme": "1.0.1",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ const path = require('path');

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const docusaurusPlugin = path.join(
__dirname,
'..',
'..',
'packages',
'docusaurus-plugin-typedoc',
'dist',
);

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down Expand Up @@ -36,29 +44,30 @@ const config = {

plugins: [
[
path.join(__dirname, '..', 'dist'),
docusaurusPlugin,
{
id: 'api-1',
out: 'api-1',
options: '../../../stubs/.config/typedoc.1.cjs',
options: '../../stubs/.config/typedoc.1.cjs',
cleanOutputDir: true,
skipIndexPage: true,
},
],
[
path.join(__dirname, '..', 'dist'),
docusaurusPlugin,
{
id: 'api-2',
out: 'api-2',
options: '../../../stubs/.config/typedoc.2.cjs',
options: '../../stubs/.config/typedoc.2.cjs',
cleanOutputDir: true,
},
],
[
path.join(__dirname, '..', 'dist'),
docusaurusPlugin,
{
id: 'api-3',
out: 'api-3',
options: '../../../stubs/.config/typedoc.3.cjs',
options: '../../stubs/.config/typedoc.3.cjs',
cleanOutputDir: true,
},
],
Expand All @@ -70,6 +79,15 @@ const config = {
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
/*async sidebarItemsGenerator({
defaultSidebarItemsGenerator,
...args
}) {
const sidebarItems = await defaultSidebarItemsGenerator(args);
return sidebarItems.filter(
(sidebarItem) => !['api-1/index'].includes(sidebarItem.id),
);
},*/
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
Expand Down Expand Up @@ -100,7 +118,7 @@ const config = {
},
items: [
{
to: 'docs/api-1/',
to: 'docs/api-1',
activeBasePath: 'docs',
label: 'API 1',
position: 'left',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"prestart": "cd ../../packages/docusaurus-plugin-typedoc && npm run build",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
Expand Down
48 changes: 48 additions & 0 deletions examples/docusaurus/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/

// @ts-check

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure

sidebar: [
{
'API-1': [
{
type: 'autogenerated',
dirName: 'api-1',
},
],
},
{
type: 'category',
label: 'API 2',
link: {
type: 'doc',
id: 'api-2/index',
},
items: [{ type: 'autogenerated', dirName: 'api-2' }],
},
{
type: 'category',
label: 'API 3',
link: {
type: 'doc',
id: 'api-3/index',
},
items: [{ type: 'autogenerated', dirName: 'api-3' }],
},
],
};

module.exports = sidebars;
File renamed without changes.
File renamed without changes.
File renamed without changes
Loading

0 comments on commit 0fbd332

Please sign in to comment.