Skip to content

Offline doc#6400

Open
GrCOTE7 wants to merge 2 commits intoflet-dev:mainfrom
GrCOTE7:offlineDoc
Open

Offline doc#6400
GrCOTE7 wants to merge 2 commits intoflet-dev:mainfrom
GrCOTE7:offlineDoc

Conversation

@GrCOTE7
Copy link
Copy Markdown
Contributor

@GrCOTE7 GrCOTE7 commented Apr 10, 2026

📝 PR Description

This pull request introduces full offline support for running yarn start, allowing contributors and users to browse the Flet documentation locally without requiring an Internet connection.

Motivation

Not everyone has access to an unlimited or stable Internet connection, — myself included... By default, Docusaurus may attempt to fetch external resources during development, which can cause errors or prevent the local dev server from starting when offline. This makes contributing or consulting the documentation difficult in low‑connectivity environments.

What this change does

  • Removes or bypasses unnecessary network requests during "yarn start".
  • Ensures all required assets are served locally (as long as the site has been successfully built at least once beforehand).
  • Then, allows the documentation site to be fully navigable offline.

Benefits

  • yarn start works reliably even with no Internet connection.
  • Contributors can work on documentation anywhere, regardless of connectivity.
  • Users with limited or expensive bandwidth can still access the full docs locally.
  • Improves accessibility and developer experience for the entire community.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update (Done)

Checklist

  • I signed the CLA.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass locally with my changes
  • I have made corresponding changes to the documentation (if applicable)

Screenshots

Additional details

Summary by Sourcery

Enable the documentation dev server to run reliably offline by reusing previously generated CrocoDocs artifacts and sanitizing problematic offline content before starting Docusaurus.

New Features:

  • Introduce a custom start script that attempts CrocoDocs generation and falls back to existing artifacts when offline, then launches the Docusaurus dev server.
  • Add a post-processing script to sanitize CrocoDocs-generated MDX artifacts and replace invalid PyPI index content with a safe fallback message.

Enhancements:

  • Update website README instructions to explain the new offline-aware start behavior and the initial online CrocoDocs generation requirement.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant