This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: simplify and add changelog (#199)
* feat: wip cortex changelog * chore: update chagelog * chore: finished add changelog page * chore: remove log * chore: get changelog manualy from directory * chore: create multi-instance docs for changelog * chore: update template changelog * chore: copy nits
- Loading branch information
Showing
18 changed files
with
1,243 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.mdx | ||
*.hbs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
hide: | ||
- title | ||
title: "v0.5.0 cortex-cpp version to log" | ||
version: 0.5.0 | ||
date: 2024-06-29 | ||
ogImage: "/img/changelog/social-card.jpg" | ||
slug: "cortex-cpp-version-to-log" | ||
description: '' | ||
--- | ||
|
||
import ChangelogHeader from "@site/src/components/ChangelogHeader" | ||
|
||
<ChangelogHeader slug="cortex-cpp-version-to-log" /> | ||
|
||
### Highlights 🎉 | ||
- Add cortex-cpp version to log | ||
- Cortex cli as client - communicate with API server via cortexjs | ||
- Unsupported platform engine status | ||
- Update default api server config | ||
- Transform anthropic response | ||
- Github hotsted to macos selfhosted | ||
- Release and fix winget | ||
- Handle multi download model, uninstall script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import chalk from "chalk"; | ||
|
||
const capitalize = (str) => { | ||
return str.charAt(0).toUpperCase() + str.slice(1); | ||
}; | ||
|
||
const camelCase = (str) => { | ||
return str.replace(/[-_](\w)/g, (_, c) => c.toUpperCase()); | ||
}; | ||
|
||
/** | ||
* @param {import("plop").NodePlopAPI} plop | ||
*/ | ||
export default async function (plop) { | ||
plop.setHelper("capitalize", (text) => { | ||
return capitalize(camelCase(text)); | ||
}); | ||
|
||
plop.load("plop-helper-date"); | ||
|
||
plop.setGenerator("create-changelog", { | ||
description: "Generates a changelog", | ||
prompts: [ | ||
{ | ||
type: "input", | ||
name: "title", | ||
message: "Enter the title of the changelog post:", | ||
validate: (input) => (input ? true : "Title is required."), | ||
}, | ||
{ | ||
type: "input", | ||
name: "slug", | ||
message: (answers) => | ||
`Enter the slug for the changelog post (suggested: ${generateSlug( | ||
answers.title | ||
)})`, | ||
default: (answers) => generateSlug(answers.title), | ||
validate: (input) => | ||
input && /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(input) | ||
? true | ||
: "Please enter a valid slug (lowercase letters, numbers, and hyphens only).", | ||
}, | ||
{ | ||
type: "input", | ||
name: "version", | ||
message: "Enter the version of the changelog post:", | ||
validate: (input) => (input ? true : "Title is required."), | ||
}, | ||
{ | ||
type: "input", | ||
name: "description", | ||
message: "Enter the description of the changelog post:", | ||
validate: (input) => (input ? true : "Description is required."), | ||
}, | ||
], | ||
|
||
actions(answers) { | ||
const actions = []; | ||
if (!answers) return actions; | ||
const { version, title, description, slug } = answers; | ||
|
||
actions.push({ | ||
type: "addMany", | ||
templateFiles: "templates/**", | ||
destination: `./changelog`, | ||
globOptions: { dot: true }, | ||
data: { title, description, version }, | ||
abortOnFail: true, | ||
}); | ||
|
||
console.log(chalk.green(`Your changelog post is created!`)); | ||
console.log(chalk.green(`You can modify under /changelog/${slug}`)); | ||
console.log( | ||
chalk.cyan( | ||
`You can view it at: http://localhost:3000/changelog/${slug}` | ||
) | ||
); | ||
|
||
return actions; | ||
}, | ||
}); | ||
|
||
function generateSlug(title) { | ||
return title | ||
? title | ||
.toLowerCase() | ||
.replace(/[^a-z0-9]+/g, "-") | ||
.replace(/^-+|-+$/g, "") | ||
: ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from "react"; | ||
|
||
const Announcement = () => { | ||
return ( | ||
<div className="inline-flex items-center justify-center alert px-4 py-3 rounded-xl mx-auto bg-indigo-500 border border-solid border-indigo-800"> | ||
{/* Please change this when cortex stable we can use from latest release endpoint */} | ||
<div className="flex items-center gap-2"> | ||
<span>🚧</span> | ||
<p className="mb-0 text-neutral-100 font-medium"> | ||
Cortex.cpp v1.0 is coming soon. | ||
<a href="/docs" className="no-underline hover:no-underline"> | ||
{" "} | ||
Read more | ||
</a> | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Announcement; |
Oops, something went wrong.