Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Qumat 0.4 Release
title: Qumat 0.4.0 Release
date: 2025-04-17
tags: [news]
authors: [mahout-team]
Expand Down
6 changes: 6 additions & 0 deletions docs/blog/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ mahout-team:
image_url: /img/mahout-favicon-black.svg
image_url_dark: /img/mahout-favicon.svg

jiekaichang:
name: Jie-Kai Chang
title: Apache Mahout PMC Member
url: https://github.com/400Ping
image_url: /img/jiekaichang.png

ryankert:
name: Ryan Huang
title: Apache Mahout Committer
Expand Down
28 changes: 6 additions & 22 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,39 +167,23 @@ circuit.h(0)

### Current Versions

- **0.5** - Current stable release (synced from `/docs/`)
Released versions are listed in `versions.json`. The first version in that file is
served as `latest` at `/docs`; the editable current docs are served at `/docs/next`.

### Creating a New Version

When releasing, snapshot the current docs:

```bash
npm run docusaurus docs:version 0.5
npm run docusaurus docs:version <release-version>
```

This creates:
- `versioned_docs/version-0.5/` - Frozen snapshot
- `versioned_docs/version-<release-version>/` - Frozen snapshot
- Updates `versions.json`

### Version Configuration

Edit `docusaurus.config.ts`:

```typescript
docs: {
lastVersion: 'current',
versions: {
current: {
label: '0.6-dev',
path: '',
},
'0.5': {
label: '0.5',
path: '0.5',
},
},
}
```
`docusaurus.config.ts` reads `versions.json` automatically, so release updates
should not require editing the Docusaurus version configuration.

## Blog Posts

Expand Down
43 changes: 26 additions & 17 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import { readFileSync } from 'node:fs';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';

const releasedVersions = JSON.parse(
readFileSync(new URL('./versions.json', import.meta.url), 'utf-8'),
) as string[];

const latestVersion = releasedVersions[0] ?? 'current';
const docsVersions = Object.fromEntries([
[
'current',
{
label: 'next',
path: 'next',
},
],
...releasedVersions.map((version, index) => [
version,
{
label: index === 0 ? 'latest' : version,
path: index === 0 ? '' : version,
},
]),
]);

const config: Config = {
title: 'Apache Mahout',
tagline: 'Distributed Linear Algebra & Quantum Computing',
Expand Down Expand Up @@ -46,22 +69,8 @@ const config: Config = {
editUrl: 'https://github.com/apache/mahout/tree/main/docs/',
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
// Versioning configuration
lastVersion: '0.5',
versions: {
current: {
label: 'next',
path: 'next',
},
'0.5': {
label: 'latest', // or '0.5' if preferred
path: '',
},
'0.4': {
label: '0.4',
path: '0.4',
},
},
lastVersion: latestVersion,
versions: docsVersions,
},
blog: {
showReadingTime: true,
Expand All @@ -72,7 +81,7 @@ const config: Config = {
editUrl: 'https://github.com/apache/mahout/tree/main/website-new/',
blogTitle: 'News & Updates',
blogDescription: 'Apache Mahout project news, releases, and community updates',
postsPerPage: 10,
postsPerPage: 'ALL',
blogSidebarCount: 'ALL',
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
Expand Down
2 changes: 2 additions & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"scripts": {
"docusaurus": "docusaurus",
"sync": "node scripts/sync-docs.js",
"sync:no-api": "MAHOUT_SKIP_API_DOCS=1 node scripts/sync-docs.js",
"start": "npm run sync && docusaurus start",
"start:no-api": "npm run sync:no-api && docusaurus start --no-open",
"prebuild": "npm run sync",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
Expand Down
13 changes: 13 additions & 0 deletions website/scripts/sync-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,19 @@ function generateApiDocs() {
},
];

if (process.env.MAHOUT_SKIP_API_DOCS === '1') {
console.log('Skipping generated Python API reference docs.');
for (const page of pages) {
const outputPath = path.join(API_DEST_DIR, page.output);
copyFile(path.join(API_SOURCE_DIR, page.header), outputPath);
fs.appendFileSync(
outputPath,
'\n\nAPI reference generation was skipped for this local preview.\n',
);
}
return;
}

runCommand('uv', ['sync', '--frozen', '--group', 'dev']);

for (const page of pages) {
Expand Down
8 changes: 5 additions & 3 deletions website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import Heading from '@theme/Heading';
import WaveAnimation from '@site/src/components/WaveAnimation';
import releasedVersions from '../../versions.json';

import styles from './index.module.css';

const latestReleasedVersion = releasedVersions[0] ?? 'next';
const siteUrl = 'https://mahout.apache.org';
const pageTitle = 'Apache Mahout';
const pageDescription =
Expand Down Expand Up @@ -87,7 +89,7 @@ function HomepageHeader() {
pip install qumat
</a>
</div>
<p className={styles.versionText}>Currently v0.5</p>
<p className={styles.versionText}>Currently v{latestReleasedVersion}</p>
</div>
</div>
</div>
Expand All @@ -100,10 +102,10 @@ function Sidebar() {
<aside className={styles.sidebar}>
{/* Qumat Release Banner */}
<div className={styles.sidebarCard}>
<div className={styles.cardHeader}>Qumat 0.5 Released!</div>
<div className={styles.cardHeader}>Qumat {latestReleasedVersion} Released!</div>
<div className={styles.cardBody}>
<p>Mahout's new quantum computing layer for building ML circuits on simulators and real quantum hardware.</p>
<Link to="/docs/qumat/getting-started">Download Qumat 0.5 →</Link>
<Link to="/docs/qumat/getting-started">Download Qumat {latestReleasedVersion} →</Link>
</div>
</div>

Expand Down
Loading
Loading