Skip to content
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
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/cli.md → cli/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Ionic CLI
sidebar_label: Overview
slug: /
---

<head>
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ files:
- /docs/api/**/*
- /docs/cli/commands/**/*
- /docs/native/**/*
- source: /cli/**/*
translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%
ignore:
- /cli/commands/**/*
32 changes: 23 additions & 9 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ module.exports = {
position: 'left',
},
{
type: 'doc',
docId: 'cli',
to: 'cli',
label: 'CLI',
position: 'left',
position: 'left'
},
{
type: 'doc',
Expand Down Expand Up @@ -269,12 +268,6 @@ module.exports = {
if ((match = docPath.match(/api\/(.*)\.md/)) != null) {
return `https://github.com/ionic-team/ionic-docs/tree/main/docs/api/${match[1]}.md`;
}
if ((match = docPath.match(/cli\/commands\/(.*)\.md/)) != null) {
return `https://github.com/ionic-team/ionic-cli/edit/develop/packages/@ionic/cli/src/commands/${match[1].replace(
'-',
'/'
)}.ts`;
}
if ((match = docPath.match(/native\/(.*)\.md/)) != null) {
return `https://github.com/ionic-team/capacitor-plugins/edit/main/${match[1]}/README.md`;
}
Expand All @@ -289,6 +282,27 @@ module.exports = {
},
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'cli',
path: 'cli',
routeBasePath: 'cli',
sidebarPath: require.resolve('./sidebars-cli.js'),
editUrl: ({ versionDocsDirPath, docPath, locale }) => {
if (locale != 'en') {
return 'https://crowdin.com/project/ionic-docs';
}
if ((match = docPath.match(/cli\/commands\/(.*)\.md/)) != null) {
return `https://github.com/ionic-team/ionic-cli/edit/develop/packages/@ionic/cli/src/commands/${match[1].replace(
'-',
'/'
)}.ts`;
}
return `https://github.com/ionic-team/ionic-docs/edit/main/${versionDocsDirPath}/${docPath}`;
},
}
],
'@docusaurus/plugin-content-pages',
'@docusaurus/plugin-debug',
'@docusaurus/plugin-sitemap',
Expand Down
4 changes: 1 addition & 3 deletions scripts/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ function writePage(page) {
renderExamples(page),
].join('');

const path = `cli/commands/${commandToKebab(page.name)}.md`;
fs.writeFileSync(`docs/${path}`, data);
fs.writeFileSync(`versioned_docs/version-v6/${path}`, data);
fs.writeFileSync(`cli/commands/${commandToKebab(page.name)}.md`, data);
}

function renderFrontmatter({ name, groups }) {
Expand Down
31 changes: 31 additions & 0 deletions sidebars-cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
cli: [
{
type: 'category',
label: 'CLI Documentation',
collapsed: false,
items: [
'index',
'configuration',
'livereload',
'using-a-proxy',
{
type: 'link',
label: 'Changelog',
href: 'https://github.com/ionic-team/ionic-cli/blob/develop/packages/@ionic/cli/CHANGELOG.md',
},
],
},
{
type: 'category',
label: 'Command Reference',
collapsed: false,
items: [
{
type: 'autogenerated',
dirName: 'commands', // Generate section automatically based on files
},
],
},
],
}
30 changes: 0 additions & 30 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,36 +485,6 @@ module.exports = {
},
],

cli: [
{
type: 'category',
label: 'CLI Documentation',
collapsed: false,
items: [
'cli',
'cli/configuration',
'cli/livereload',
'cli/using-a-proxy',
{
type: 'link',
label: 'Changelog',
href: 'https://github.com/ionic-team/ionic-cli/blob/develop/packages/@ionic/cli/CHANGELOG.md',
},
],
},
{
type: 'category',
label: 'Command Reference',
collapsed: false,
items: [
{
type: 'autogenerated',
dirName: 'cli/commands', // Generate section automatically based on files
},
],
},
],

native: [
{
type: 'category',
Expand Down
49 changes: 0 additions & 49 deletions versioned_docs/version-v5/cli.md

This file was deleted.

174 changes: 0 additions & 174 deletions versioned_docs/version-v5/cli/commands/build.md

This file was deleted.

Loading