diff --git a/docs/extra/ragas-modern.css b/docs/extra/ragas-modern.css index 9731593d..2bb4ffa0 100644 --- a/docs/extra/ragas-modern.css +++ b/docs/extra/ragas-modern.css @@ -175,4 +175,49 @@ code, kbd, samp, pre { margin-top: 1.5rem; } -/* Let Material Design handle everything else - no custom colors, spacing, or layouts */ \ No newline at end of file +/* Let Material Design handle everything else - no custom colors, spacing, or layouts */ + +/* Copy to LLM button - dark mode styling */ +/* Using semantic naming: surface (background), text (foreground), border, hover-overlay */ +[data-md-color-scheme="slate"] .copy-to-llm-split-container { + --copy-llm-border: #404040; + --copy-llm-surface: #2d2d2d; + --copy-llm-text: #e0e0e0; + --copy-llm-hover-overlay: rgba(255, 255, 255, 0.1); + border-color: var(--copy-llm-border); +} + +[data-md-color-scheme="slate"] .copy-to-llm-section { + background-color: var(--copy-llm-surface) !important; + color: var(--copy-llm-text) !important; +} + +[data-md-color-scheme="slate"] .copy-to-llm-left { + border-right-color: var(--copy-llm-border) !important; +} + +[data-md-color-scheme="slate"] .copy-to-llm-left:hover, +[data-md-color-scheme="slate"] .copy-to-llm-right:hover, +[data-md-color-scheme="slate"] .copy-to-llm-right.active { + background-color: var(--md-accent-fg-color) !important; + color: #ffffff !important; +} + +[data-md-color-scheme="slate"] .copy-to-llm-dropdown { + background-color: var(--copy-llm-surface) !important; + border-color: var(--copy-llm-border) !important; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); +} + +[data-md-color-scheme="slate"] .copy-to-llm-dropdown-item { + color: var(--copy-llm-text) !important; +} + +[data-md-color-scheme="slate"] .copy-to-llm-dropdown-item:hover { + background-color: var(--copy-llm-hover-overlay) !important; +} + +[data-md-color-scheme="slate"] .copy-to-llm-dropdown-item:active { + background-color: var(--md-accent-fg-color) !important; + color: #ffffff !important; +} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 5054f6ff..068f648c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -266,6 +266,14 @@ plugins: - search - social: enabled: !ENV [MKDOCS_CI, true] + - copy-to-llm: + repo_url: "https://raw.githubusercontent.com/vibrantlabsai/ragas/main/docs" + buttons: + copy_page: true + copy_markdown_link: false # Disabled until plugin bug is fixed + view_as_markdown: false # Disabled until plugin bug is fixed + open_in_chatgpt: true + open_in_claude: true - llmstxt: markdown_description: | Ragas is an open-source evaluation framework for LLM applications including RAG pipelines, diff --git a/pyproject.toml b/pyproject.toml index a4cc4e5c..28c2d172 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -183,6 +183,7 @@ docs = [ "mkdocs-section-index", "mkdocs-git-committers-plugin-2", "mkdocs-git-revision-date-localized-plugin", + "mkdocs-copy-to-llm", "mkdocs-llmstxt", # Requires Python 3.10+, only used in docs CI ]