diff --git a/.github/workflows/deploy_gh-pages.yml b/.github/workflows/deploy_gh-pages.yml index d928c36059..9c38195314 100644 --- a/.github/workflows/deploy_gh-pages.yml +++ b/.github/workflows/deploy_gh-pages.yml @@ -18,13 +18,13 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 18 - cache: npm - cache-dependency-path: ./docs/package-lock.json + cache: yarn + cache-dependency-path: ./docs/yarn.lock - name: Install dependencies - run: cd docs && npm install --legacy-peer-deps + run: cd docs && yarn install - name: Build website - run: cd docs && npm run build + run: cd docs && yarn build # Popular action to deploy to GitHub Pages: # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus diff --git a/docs/docs/Concepts/concepts-overview.md b/docs/docs/Concepts/concepts-overview.md index 35ba8c6686..134c1da9fc 100644 --- a/docs/docs/Concepts/concepts-overview.md +++ b/docs/docs/Concepts/concepts-overview.md @@ -91,6 +91,21 @@ To access the **Logs** pane, click your **Flow Name**, and then select **Logs**. ![](/img/logs.png) +Langflow stores logs at the location specified in the `LANGFLOW_CONFIG_DIR` environment variable. + +This directory's default location depends on your operating system. + +* **Linux/WSL**: `~/.cache/langflow/` +* **macOS**: `/Users//Library/Caches/langflow/` +* **Windows**: `%LOCALAPPDATA%\langflow\langflow\Cache` + +To modify the location of your log file: + +1. Add `LANGFLOW_LOG_FILE=path/to/logfile.log` in your `.env.` file. +2. To start Langflow with the values from your `.env` file, start Langflow with `uv run langflow run --env-file .env`. + +An example `.env` file is available in the [project repository](https://github.com/langflow-ai/langflow/blob/main/.env.example). + ## Projects and folders The **My Projects** page displays all the flows and components you've created in the Langflow workspace. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 4b91aff2f3..3ea078aec3 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -20,9 +20,6 @@ const config = { projectName: "langflow", trailingSlash: false, staticDirectories: ["static"], - customFields: { - mendableAnonKey: "b7f52734-297c-41dc-8737-edbd13196394", // Mendable Anon Client-side key, safe to expose to the public - }, i18n: { defaultLocale: "en", locales: ["en"], @@ -261,6 +258,15 @@ const config = { hideable: false, }, }, + algolia: { + appId: 'UZK6BDPCVY', + // public key, safe to commit + apiKey: 'adbd7686dceb1cd510d5ce20d04bf74c', + indexName: 'langflow', + contextualSearch: true, + searchParameters: {}, + searchPagePath: 'search', + }, }), }; diff --git a/docs/package.json b/docs/package.json index 241ac8d66f..cb437e3ed0 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,10 +12,10 @@ }, "dependencies": { "@code-hike/mdx": "^0.9.0", - "@docusaurus/core": "^3.7.0", + "@docusaurus/core": "3.7.0", "@docusaurus/plugin-client-redirects": "^3.7.0", "@docusaurus/plugin-google-tag-manager": "^3.7.0", - "@docusaurus/preset-classic": "^3.7.0", + "@docusaurus/preset-classic": "3.7.0", "@easyops-cn/docusaurus-search-local": "^0.45.0", "@mdx-js/react": "^3.0.1", "@mendable/search": "^0.0.206", diff --git a/docs/src/theme/Footer.js b/docs/src/theme/Footer.js index 4ab5dea20c..aed2e940bc 100644 --- a/docs/src/theme/Footer.js +++ b/docs/src/theme/Footer.js @@ -1,52 +1,77 @@ -import React from "react"; +import React, { useState } from "react"; import Footer from "@theme-original/Footer"; -import { MendableFloatingButton } from "@mendable/search"; -import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import { useDocSearchKeyboardEvents } from '@docsearch/react'; export default function FooterWrapper(props) { - const iconSpan1 = React.createElement( - "img", - { - src: "/img/langflow-icon-black-transparent.svg", - srcDark: "", - style: { width: "40px" }, - }, - null - ); + const [isHovered, setIsHovered] = useState(false); + const searchButtonRef = React.useRef(null); - const icon = React.createElement( - "div", - { - style: { - color: "#000000", - fontSize: "22px", - width: "48px", - height: "48px", - margin: "0px", - padding: "0px", - display: "flex", - alignItems: "center", - justifyContent: "center", - textAlign: "center", - }, + useDocSearchKeyboardEvents({ + isOpen: false, + onOpen: () => { + searchButtonRef.current?.click(); }, - [iconSpan1] - ); - const { - siteConfig: { customFields }, - } = useDocusaurusContext(); - - const mendableFloatingButton = React.createElement(MendableFloatingButton, { - floatingButtonStyle: { color: "#000000", backgroundColor: "#f6f6f6" }, - anon_key: customFields.mendableAnonKey, - showSimpleSearch: true, - icon: icon, }); + const searchButton = ( +
{ + // This will trigger Docusaurus's default search modal + document.querySelector('.DocSearch-Button')?.click(); + }} + onMouseEnter={() => setIsHovered(true)} + onMouseLeave={() => setIsHovered(false)} + style={{ + position: 'fixed', + right: '20px', + bottom: '20px', + zIndex: 100, + display: 'flex', + alignItems: 'center', + gap: '10px', + cursor: 'pointer', + }} + > + {isHovered && ( +
+ Hi, how can I help you? +
+ )} +
+ Search +
+
+ ); + return ( <> -