Skip to content

Main custom docs - #2779

Open
buggypather wants to merge 12 commits into
freeCodeCamp:mainfrom
buggypather:main-custom-docs
Open

buggypather wants to merge 12 commits into
freeCodeCamp:mainfrom
buggypather:main-custom-docs

Conversation

@buggypather

Copy link
Copy Markdown

If you’re adding a new scraper, please ensure that you have:

  • Tested the scraper on a local copy of DevDocs
  • Ensured that the docs are styled similarly to other docs on DevDocs
  • Added these files to the public/icons/your_scraper_name/ directory:
    • 16.png: a 16×16 pixel icon for the doc
    • 16@2x.png: a 32×32 pixel icon for the doc
    • SOURCE: A text file containing the URL to the page the image can be found on or the URL of the original image itself

If you're updating existing documentation to its latest version, please ensure that you have:

  • Updated the versions and releases in the scraper file
  • Ensured the license is up-to-date
  • Ensured the icons and the SOURCE file in public/icons/your_scraper_name/ are up-to-date if the documentation has a custom icon
  • Ensured self.links contains up-to-date urls if self.links is defined
  • Tested the changes locally to ensure:
    • The scraper still works without errors
    • The scraped documentation still looks consistent with the rest of DevDocs
    • The categorization of entries is still good

Aaron and others added 6 commits October 29, 2026 03:01
A doc pack is a folder laid out like public/docs (docs.json, and per doc
index.json, db.json and the pages), served from GitHub or any HTTPS site
that allows cross-origin reads. Packs are added under Preferences > Doc
packs, stored in localStorage, and their docs are listed, enabled,
installed offline and updated like built-in docs.

- Pack docs get the pack's code in their slug, so they can't replace a
  built-in doc or another pack's, and are fetched from the pack's folder.
- Everything from a pack is checked before it's shown: names and
  attributions lose markup, links must be http(s), unsafe entry paths
  are dropped, and pages go through DOMPurify (vendored, 3.4.17).
- The server serves the full app for pack-doc URLs, which it can't know.
- Type names are now escaped on the type page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Show which docs.json an address will be read from, as it's typed.
- When adding fails, say why and what to do: the built-in doc that
  comes from that site, how to point at a folder of a GitHub repository,
  or, for documentation websites, where to find or how to make a pack.
- Tell a missing docs.json (404) apart from an unreachable site.
- Refuse addresses with spaces or without a dot in the host.
- Guide: sharing packs with the devdocs-pack topic, the simple style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Categories: every built-in doc is sorted into one of ten categories
(Languages, Web platform, Frameworks & platforms, Libraries, Testing,
Tools, Databases, AI & data, Servers & services, Other); a doc pack can
give its docs a category. The sidebar groups the enabled docs under
category headings when they span several, the preferences' doc list is
grouped too (the filter hides empty groups), and typing a category's
name or short form (e.g. "db", "web") then Tab scopes the search to its
docs.

Resume: the doc page being read and its scroll position are kept in
local storage; opening DevDocs on its home page reopens it, while links
to a page and searches go where they say. A preference turns it off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the doc packs, categories and resume work onto the latest upstream main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- npm run icon -- <slug> <website> finds a website's icon (PNG or ICO), resizes
  it to 16 and 32 pixels and saves it with a SOURCE file for built-in docs, or
  into a doc pack with --pack, marking the doc in docs.json.
- Doc packs can give a doc an icon (<slug>/16@2x.png and "icon": true). It is
  downloaded with the pack, checked to be a small PNG and kept in the browser,
  so it shows offline; docs without one keep the plain icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@buggypather
buggypather requested a review from a team as a code owner November 2, 2026 22:08
buggypather and others added 4 commits November 2, 2026 17:59
…oc menu

- Removing a pack asks in a box in the page rather than window.confirm,
  which some app shells block.
- The doc packs section moves to the bottom of Preferences, collapsed
  unless a link leads to it (/settings#doc-packs) or a pack was just added
  or removed.
- The Offline page has a yellow note linking to adding docs by link, with a
  yellow note style for the dark theme too.
- A button next to the search box shows the opened doc's icon and opens its
  contents, with a box that searches only that doc (not focused on open).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Gemfile: fiddle on Windows, which reline needs and Ruby 4.0 no longer
  bundles; Gemfile.lock gains the Windows platform.
- The opened doc's button goes before the search box, as in the sketch.
- A pack's Remove link hides while its confirmation box is open: ._btn-link
  set a display that overrode the hidden attribute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The button names the doc and stays pinned at the top left of the page (under
the header on phones). Its panel opens over the page, on top of everything,
listing the doc's sections in the sidebar's order; each opens to its entries.
The search box stays, unfocused. The header button is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedgem/​fiddle@​1.1.898100100100100

View full report

buggypather and others added 2 commits November 2, 2026 23:47
Scrapes firebase.google.com/docs (the guides, not the API references) into
a doc: Google's page furniture removed, code-sample tabs labelled and their
code coloured in each tab's language, pages grouped by product.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rate limit counts requests per minute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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