ollama4j/docs/docusaurus.config.js
amithkoujalgi bc90a15a68
Add "Examples" link to navbar and footer
Added a link to the "Examples" repository in both the navbar and the "Usage" section of the footer. This improves accessibility to code examples, providing users with an easier way to explore practical use cases.
2025-03-08 16:45:43 +05:30

161 lines
5.9 KiB
JavaScript

// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import {themes as prismThemes} from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Ollama4j',
tagline: 'Java library for interacting with Ollama.',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://your-docusaurus-site.example.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/ollama4j/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'ollama4j', // Usually your GitHub org/user name.
projectName: 'ollama4j', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: 'docs',
routeBasePath: '', // change this to any URL route you'd want. For example: `home` - if you want /home/intro.
sidebarPath: './sidebars.js',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/ollama4j/ollama4j/blob/main/docs',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/ollama4j/ollama4j/blob/main/docs',
},
theme: {
customCss: './src/css/custom.css',
},
gtag: {
trackingID: 'G-G7FLH6FNDC',
anonymizeIP: false,
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'Ollama4j',
logo: {
alt: 'Ollama4j Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Docs',
},
{to: 'https://github.com/ollama4j/ollama4j-examples', label: 'Examples', position: 'left'},
{to: 'https://ollama4j.github.io/ollama4j/apidocs/', label: 'Javadoc', position: 'left'},
{to: 'https://ollama4j.github.io/ollama4j/doxygen/html/', label: 'Doxygen', position: 'left'},
{to: '/blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/ollama4j/ollama4j',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Tutorial',
to: '/intro',
},
],
},
{
title: 'Usage',
items: [
{
label: 'Examples',
to: 'https://github.com/ollama4j/ollama4j-examples',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/ollama4j',
},
{
label: 'Twitter',
href: 'https://twitter.com/ollama4j',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/ollama4j/ollama4j',
},
],
},
],
copyright: `Ollama4j Documentation ${new Date().getFullYear()}. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['java'],
},
}),
markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid']
};
export default config;