Skip to content

Commit d21bbf1

Browse files
POC for Versions being updated from the ReleaseRegistry
Any Cody block which has {CURRENT_VERSION} will be replaced by the latest release from the ReleaseRegistry. This PR also fixes the PreCodeBlock component, which previously didn't really work at all. The copy function was broken, and the children check didn't do anything (child is never of type string in react) Up next is cleaning up the Versions file (it'll be removed) And then replacing all hard coded versions with the same process is the POC. Then we'll also need some automation which deploys / builds the website at release time since the release version gets determined at compile time rather than client time.
1 parent bb2620e commit d21bbf1

File tree

6 files changed

+5798
-3766
lines changed

6 files changed

+5798
-3766
lines changed

docs/cody/flake.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
description = "A basic flake with a shell";
3+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
4+
inputs.flake-utils.url = "github:numtide/flake-utils";
5+
6+
outputs =
7+
{ nixpkgs, flake-utils, ... }:
8+
flake-utils.lib.eachDefaultSystem (
9+
system:
10+
let
11+
pkgs = nixpkgs.legacyPackages.${system};
12+
in
13+
{
14+
devShells.default = pkgs.mkShell { packages = [ pkgs.nodejs pkgs.pnpm ]; };
15+
}
16+
);
17+
}

flake.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
description = "A basic flake with a shell";
3+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
4+
inputs.flake-utils.url = "github:numtide/flake-utils";
5+
6+
outputs =
7+
{ nixpkgs, flake-utils, ... }:
8+
flake-utils.lib.eachDefaultSystem (
9+
system:
10+
let
11+
pkgs = nixpkgs.legacyPackages.${system};
12+
in
13+
{
14+
devShells.default = pkgs.mkShell { packages = [ pkgs.nodejs pkgs.pnpm ]; };
15+
}
16+
);
17+
}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"@docsearch/react": "3",
1616
"@headlessui/react": "^1.7.13",
1717
"@heroicons/react": "^2.0.18",
18+
"@mdx-js/mdx": "^3.0.1",
1819
"@next/third-parties": "^14.1.4",
1920
"@radix-ui/react-hover-card": "^1.1.1",
2021
"@radix-ui/react-select": "^2.0.0",
@@ -37,13 +38,15 @@
3738
"js-yaml": "^4.1.0",
3839
"kbar": "^0.1.0-beta.44",
3940
"lucide-react": "^0.372.0",
41+
"mdx": "^0.3.1",
4042
"next": "^14.2.3",
4143
"next-contentlayer": "^0.3.4",
4244
"next-themes": "^0.2.1",
4345
"prism-react-renderer": "^2.0.6",
4446
"react": "18.3.1",
4547
"react-dom": "18.3.1",
4648
"react-highlight-words": "^0.20.0",
49+
"react-syntax-highlighter": "^15.5.0",
4750
"rehype-autolink-headings": "^7.1.0",
4851
"rehype-pretty-code": "^0.10.2",
4952
"rehype-slug": "^6.0.0",

0 commit comments

Comments
 (0)