Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dan test 1#1577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
chillenberger merged 9 commits intomasterfromdan-test-1
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes fromall 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
56 changes: 55 additions & 1 deletionpgml-dashboard/src/api/cms.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,7 @@ use std::{
path::{Path,PathBuf},
};

use rocket::response::Redirect;
use std::str::FromStr;

use comrak::{format_html_with_plugins, parse_document,Arena,ComrakPlugins};
Expand DownExpand Up@@ -62,7 +63,10 @@ lazy_static! {
("transformers/fine_tuning/","api/sql-extension/pgml.tune"),
("guides/predictions/overview","api/sql-extension/pgml.predict/"),
("machine-learning/supervised-learning/data-pre-processing","api/sql-extension/pgml.train/data-pre-processing"),
("api/client-sdk/getting-started","api/client-sdk/"),
("introduction/getting-started/import-your-data/","introduction/import-your-data/"),
("introduction/getting-started/import-your-data/foreign-data-wrapper","introduction/import-your-data/foreign-data-wrappers"),
("use-cases/embeddings/generating-llm-embeddings-with-open-source-models-in-postgresml","open-source/pgml/guides/embeddings/in-database-generation"),
("use-cases/natural-language-processing","open-source/pgml/guides/natural-language-processing"),
])
);
}
Expand DownExpand Up@@ -857,6 +861,50 @@ pub async fn careers_apply(title: PathBuf, cluster: &Cluster) -> Result<Response
Ok(ResponseOk(layout.render(page)))
}

/// Redirect api to open-source
#[get("/docs/api/<path..>")]
pubasyncfnapi_redirect(path:PathBuf) ->Redirect{
match path.to_str().unwrap(){
"apis" =>Redirect::permanent("/docs/open-source/korvus/"),
"client-sdk/search" =>{
Redirect::permanent("/docs/open-source/korvus/guides/document-search")
}
"client-sdk/getting-started" =>Redirect::permanent("/docs/open-source/korvus/"),
"sql-extensions/pgml.predict/" =>Redirect::permanent("/docs/open-source/pgml/api/pgml.predict/"),
"sql-extensions/pgml.deploy" =>Redirect::permanent("/docs/open-source/pgml/api/pgml.deploy"),
_ =>Redirect::permanent("/docs/open-source/".to_owned() + path.to_str().unwrap()),
}
}

/// Redirect our old sql-extension path.
#[get("/docs/open-source/sql-extension/<path..>")]
pubasyncfnsql_extension_redirect(path:PathBuf) ->Redirect{
Redirect::permanent("/docs/open-source/pgml/api/".to_owned() + path.to_str().unwrap())
}

/// Redirect our old pgcat path.
#[get("/docs/product/pgcat/<path..>")]
pubasyncfnpgcat_redirect(path:PathBuf) ->Redirect{
Redirect::permanent("/docs/open-source/pgcat/".to_owned() + path.to_str().unwrap())
}

/// Redirect our old cloud-database path.
#[get("/docs/product/cloud-database/<path..>")]
pubasyncfncloud_database_redirect(path:PathBuf) ->Redirect{
let path = path.to_str().unwrap();
if path.is_empty(){
Redirect::permanent("/docs/cloud/overview")
}else{
Redirect::permanent("/docs/cloud/".to_owned() + path)
}
}

/// Redirect our old pgml docs.
#[get("/docs/open-source/client-sdk/<path..>")]
pubasyncfnpgml_redirect(path:PathBuf) ->Redirect{
Redirect::permanent("/docs/open-source/korvus/api/".to_owned() + path.to_str().unwrap())
}

#[get("/docs/<path..>", rank =5)]
asyncfnget_docs(
path:PathBuf,
Expand DownExpand Up@@ -936,6 +984,7 @@ async fn docs_landing_page(cluster: &Cluster) -> Result<ResponseOk, crate::respo
Ok(ResponseOk(doc_layout.render(page)))
}

/// Redirect our old MkDocs paths to the new ones under `/docs`.
#[get("/user_guides/<path..>", rank =5)]
asyncfnget_user_guides(path:PathBuf) ->Result<Response,crate::responses::NotFound>{
Ok(Response::redirect(format!("/docs/{}", path.display().to_string())))
Expand DownExpand Up@@ -1003,6 +1052,11 @@ pub fn routes() -> Vec<Route> {
search,
search_blog,
demo,
sql_extension_redirect,
api_redirect,
pgcat_redirect,
pgml_redirect,
cloud_database_redirect
]
}

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,4 +13,8 @@ div[data-controller="cms-index-link"] {
text-decoration:underline;
text-underline-offset:2px;
}

.material-symbols-outlined {
user-select:none;
}
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,10 @@ div[data-controller="navigation-left-nav-docs"] {
box-sizing:border-box;
width:100%;
}

.doc-leftnav-inner {
width:100%;
}

.show-scroll {
padding-right:25px;
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@
"guides" => "menu_book",
"resources" => "school",
"introduction" => "list_alt",
"cloud" => "cloud",
_ => "dashboard",
}
}
Expand All@@ -26,7 +27,7 @@
<% if !mobile { %>
<divclass="doc-leftnav-container"id="doc-leftnav-container"data-controller="navigation-left-nav-docs"data-turbo-permanent>
<navclass="doc-leftnav"data-scroll="0"data-navigation-left-nav-docs-target="leftNav">
<divclass="d-flex flex-column justify-content-between">
<divclass="d-flex flex-column justify-content-between doc-leftnav-inner">
<divclass="d-xl-flex flex-column py-4">
<divclass="pt-2 ps-2 d-flex flex-column gap-4_5">
<% for doc_link in index.clone().into_iter() { %>
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,10 +22,19 @@ impl MarketingFooter {
StaticNavLink::new("VPC".into(),"/docs/cloud/enterprise/vpc".into()),
],
solutions:vec![
StaticNavLink::new("NLP".into(),"/docs/open-source/pgml/guides/natural-language-processing".into()),
StaticNavLink::new("Supervised Learning".into(),"/docs/open-source/pgml/guides/supervised-learning".into()),
StaticNavLink::new(
"NLP".into(),
"/docs/open-source/pgml/guides/natural-language-processing".into(),
),
StaticNavLink::new(
"Supervised Learning".into(),
"/docs/open-source/pgml/guides/supervised-learning".into(),
),
StaticNavLink::new("Embedding".into(),"/docs/open-source/pgml/guides/embeddings/".into()),
StaticNavLink::new("Vector Database".into(),"/docs/open-source/pgml/guides/vector-database".into()),
StaticNavLink::new(
"Vector Database".into(),
"/docs/open-source/pgml/guides/vector-database".into(),
),
StaticNavLink::new(
"Search".into(),
"/docs/open-source/pgml/guides/improve-search-results-with-machine-learning".into(),
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp