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
5 changes: 5 additions & 0 deletions .changeset/afraid-seals-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@calycode/cli": patch
---

chore: remove tailwind cdn from docs [#131](https://github.com/calycode/xano-tools/issues/131)
7 changes: 7 additions & 0 deletions .changeset/upset-teeth-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@calycode/core': minor
'@calycode/cli': minor
---

feat: new command `generate-internal-docs` that creates a directory of docsfiy powered browseable documentation for your workspace rendered from markdown on client (Docsify)
chore: update docs to include the new command
6 changes: 6 additions & 0 deletions .changeset/wise-yaks-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@calycode/core": patch
"@calycode/cli": patch
---

fix: fixing multiple issues with the generated markdown of the workspace, that was causing broken links
6 changes: 3 additions & 3 deletions docs/commands/export-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Usage: xano export-backup [options]
Backup Xano Workspace via Metadata API

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup
command.
--instance <instance> The instance name. This is used to fetch the
instance configuration. The value provided at the
setup command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
Expand Down
10 changes: 5 additions & 5 deletions docs/commands/generate-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ $ xano generate-code --help
Usage: xano generate-code [options]

Create a library based on the OpenAPI specification. If the openapi
specification has not yet been generated, this will generate that as well as the
first step.
specification has not yet been generated, this will generate that as well as
the first step.

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup
command.
--instance <instance> The instance name. This is used to fetch the
instance configuration. The value provided at the
setup command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
Expand Down
6 changes: 3 additions & 3 deletions docs/commands/generate-oas.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Scalar API Reference. + this command brings the Swagger docs to OAS 3.1+
version.

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup
command.
--instance <instance> The instance name. This is used to fetch the
instance configuration. The value provided at the
setup command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
Expand Down
9 changes: 5 additions & 4 deletions docs/commands/generate-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ API to offer the full details. However that is enriched with the Xanoscripts
after Xano 2.0 release.

Options:
-I, --input <file> Workspace yaml file from a local source, if present.
-I, --input <file> Workspace yaml file from a local source, if
present.
-O, --output <dir> Output directory (overrides default config), useful
when ran from a CI/CD pipeline and want to ensure
consistent output location.
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup
command.
--instance <instance> The instance name. This is used to fetch the
instance configuration. The value provided at the
setup command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
Expand Down
10 changes: 5 additions & 5 deletions docs/commands/generate-xs-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ $ xano generate-xs-repo [options]
$ xano generate-xs-repo --help
Usage: xano generate-xs-repo [options]

Process Xano workspace into repo structure. Supports table, function and apis as
of know. Xano VSCode extension is the preferred solution over this command.
Process Xano workspace into repo structure. Supports table, function and apis
as of know. Xano VSCode extension is the preferred solution over this command.
Outputs of this process are also included in the default repo generation
command.

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup
command.
--instance <instance> The instance name. This is used to fetch the
instance configuration. The value provided at the
setup command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
Expand Down
10 changes: 5 additions & 5 deletions docs/commands/registry-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ $ xano registry-add [options]
$ xano registry-add --help
Usage: xano registry-add [options] <components...>

Add a prebuilt component to the current Xano context, essentially by pushing an
item from the registry to the Xano instance.
Add a prebuilt component to the current Xano context, essentially by pushing
an item from the registry to the Xano instance.

Arguments:
components Space delimited list of components to add to your
Xano instance.

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup
command.
--instance <instance> The instance name. This is used to fetch the
instance configuration. The value provided at the
setup command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
Expand Down
7 changes: 4 additions & 3 deletions docs/commands/registry-scaffold.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ $ xano registry-scaffold --help
Usage: xano registry-scaffold [options]

Scaffold a Xano registry folder with a sample component. Xano registry can be
used to share and reuse prebuilt components. In the registry you have to follow
the [registry](https://calycode.com/schemas/registry/registry.json) and
used to share and reuse prebuilt components. In the registry you have to
follow the [registry](https://calycode.com/schemas/registry/registry.json) and
[registry item](https://calycode.com/schemas/registry/registry-item.json)
schemas.

Options:
--output <path> Local output path for the registry
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup command.
configuration. The value provided at the setup
command.
-h, --help display help for command
```
13 changes: 7 additions & 6 deletions docs/commands/restore-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@ $ xano restore-backup [options]
$ xano restore-backup --help
Usage: xano restore-backup [options]

Restore a backup to a Xano Workspace via Metadata API. DANGER! This action will
override all business logic and restore the original v1 branch. Data will be
also restored from the backup file.
Restore a backup to a Xano Workspace via Metadata API. DANGER! This action
will override all business logic and restore the original v1 branch. Data will
be also restored from the backup file.

Options:
--instance <instance> The instance name. This is used to fetch the
instance configuration. The value provided at the
setup command.
instance configuration. The value provided at
the setup command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano
interface.
-S, --source-backup <file> Local path to the backup file to restore.
--force Force restoration without confirmation, not
advised to be specified, useful when ran from a
CI/CD pipeline and consequences are acknowledged.
CI/CD pipeline and consequences are
acknowledged.
-h, --help display help for command
```
7 changes: 4 additions & 3 deletions docs/commands/run-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ Options:
instance configuration. The value provided at the
setup command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
configuration. Same as on Xano Interface.
workspace configuration. Same as on Xano
interface.
--branch <branch> The branch name. This is used to select the
branch configuration. Same as on Xano Interface.
--group <name> API group name. Same as on Xano Interface.
--all Regenerate for all API groups in the workspace /
branch of the current context.
Expand Down
10 changes: 5 additions & 5 deletions docs/commands/serve-oas.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ $ xano serve-oas [options]
$ xano serve-oas --help
Usage: xano serve-oas [options]

Serve the Open API specification locally for quick visual check, or to test your
APIs via the Scalar API reference.
Serve the Open API specification locally for quick visual check, or to test
your APIs via the Scalar API reference.

Options:
--instance <instance> The instance name. This is used to fetch the instance
configuration. The value provided at the setup
command.
--instance <instance> The instance name. This is used to fetch the
instance configuration. The value provided at the
setup command.
--workspace <workspace> The workspace name. This is used to fetch the
workspace configuration. Same as on Xano interface.
--branch <branch> The branch name. This is used to select the branch
Expand Down
4 changes: 2 additions & 2 deletions docs/commands/serve-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Serve the registry locally. This allows you to actually use your registry
without deploying it to any remote host.

Options:
--root <path> Where did you put your registry? (Local path to the registry
directory)
--root <path> Where did you put your registry? (Local path to the
registry directory)
--listen <port> The port where you want your registry to be served locally.
By default it is 5000.
--cors Do you want to enable CORS? By default false.
Expand Down
149 changes: 149 additions & 0 deletions docs/custom-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
body {
font-family: 'Noto Sans', ui-sans-serif, system-ui;
}

:root {
--theme-color: #45f3ff;
--content-max-width: 104ch;
--sidebar-toggle-alignment: start;
/* start center end */
--sidebar-toggle-bg: var(--color-mono-2);
--sidebar-toggle-bg-hover: var(--button-bg);
--sidebar-toggle-color: var(--color-mono-4);
--sidebar-toggle-color-hover: var(--button-color);
--sidebar-toggle-height: 42px;
--sidebar-toggle-margin-block: 24px;
--sidebar-toggle-width: 32px;

/* termynal style variables */
--termynal-bg: var(--code-bg);
--termynal-color: var(--code-color);
--termynal-color-subtle: var(--color-mono-5);
--termynal-highlight-color: var(--theme-color);
--termynal-cursor: #00ff00;
--termynal-font: var(--font-family-mono);
--termynal-font-size: var(--font-size-m);
--termynal-border-radius: var(--border-radius);
}

/* Dark mode toggle */
#dark-mode-toggle {
display: block;
padding: 4px 8px;
border-radius: 8px;
border: none;
background: var(--color-mono-2);
color: var(--theme-color);
font-size: 1.1em;
cursor: pointer;
transition: background 0.2s;
}

#dark-mode-toggle:hover {
background: var(--color-mono-4);
color: var(--theme-color);
}

/* Terminaly plugin styles customized to work with light and dark mode both */
[data-termynal] {
width: 100%;
max-width: 100%;
background: var(--termynal-bg);
color: var(--termynal-color);
font-size: var(--termynal-font-size);
font-family: var(--termynal-font);
border-radius: var(--termynal-border-radius);
padding: 38px 15px 10px;
position: relative;
-webkit-box-sizing: border-box;
box-sizing: border-box;
z-index: 1;
}

/* termynal window-control-icons */
[data-termynal]:before {
content: '';
position: absolute;
top: 15px;
left: 15px;
display: inline-block;
width: 15px;
height: 15px;
border-radius: 50%;
/* A little hack to display the window buttons in one pseudo element. */
background: #d9515d;
-webkit-box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
}

/* termynal label */
[data-termynal]:after {
content: 'bash';
position: absolute;
color: var(--termynal-color-subtle);
top: 5px;
left: 0;
width: 100%;
text-align: center;
}

a[data-terminal-control] {
color: var(--termynal-highlight-color);
position: absolute;
top: 5px;
right: 15px;
z-index: 2;
text-decoration: none;
}

a[data-terminal-control]:hover {
color: var(--termynal-highlight-color);
font-weight: 700;
}

[data-ty] {
display: block;
}

[data-ty]:before {
/* Set up defaults and ensure empty lines are displayed. */
content: '';
display: inline-block;
vertical-align: middle;
}

[data-ty='input']:before,
[data-ty-prompt]:before {
margin-right: 0.75em;
color: var(--termynal-color);
}

[data-ty='input']:before {
content: '$';
}

[data-ty][data-ty-prompt]:before {
content: attr(data-ty-prompt);
}

[data-ty-cursor]:after {
content: attr(data-ty-cursor);
font-family: var(--termynal-font-family);
margin-left: 0.5em;
-webkit-animation: blink 1s infinite;
animation: blink 1s infinite;
}

/* Cursor animation */

@-webkit-keyframes blink {
50% {
opacity: 0;
}
}

@keyframes blink {
50% {
opacity: 0;
}
}
Loading