
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
@diplodoc/algolia-extension
Advanced tools
This extension provides Algolia search integration for Diplodoc documentation. It enables powerful search functionality for your documentation by indexing content into Algolia and providing a seamless search experience for your users.
npm install @diplodoc/algolia-extension
By default, the extension only creates local search indices in the _search directory of your output folder. These local indices are JSON files that contain the processed documentation content.
To upload these indices to Algolia, you need to either:
index parameter to true during the build processindex command after building the documentationTo use this extension, you need to provide Algolia credentials:
| Parameter | Environment Variable | CLI Option | Description | 
|---|---|---|---|
| App ID | ALGOLIA_APP_ID | --app-id | Your Algolia application ID | 
| API Key | ALGOLIA_API_KEY | --api-key | Your Algolia admin API key (for indexing) | 
| Index Name | ALGOLIA_INDEX_NAME | --index-name | Name of the Algolia index | 
| Parameter | CLI Option | Default | Description | 
|---|---|---|---|
| Input Path | --input | ./ | Path to documentation directory | 
| Index | --index | false | Whether to create and upload an index for search | 
You can configure the extension using three different methods:
Environment Variables
ALGOLIA_APP_ID, ALGOLIA_API_KEY, ALGOLIA_INDEX_NAMECLI Flags
--app-id, --api-key, --index-nameConfiguration File (.yfm)
.yfm fileExample priority: CLI flags > Environment variables > Configuration file
| Parameter | CLI Flag | Environment Variable | .yfm Config | Description | 
|---|---|---|---|---|
| appId | --app-id | ALGOLIA_APP_ID | search.appId | Algolia Application ID | 
| apiKey | --api-key | ALGOLIA_API_KEY | search.apiKey | Algolia API Key for indexing | 
| indexName | --index-name | ALGOLIA_INDEX_NAME | search.indexName | Index name (e.g., "docs") | 
| index | --index | - | search.index | Whether to upload indices to Algolia (default: false) | 
| searchApiKey | --search-api-key | ALGOLIA_SEARCH_API_KEY | search.searchApiKey | Client-side API key for search | 
| provider | --search-provider | ALGOLIA_PROVIDER | search.provider | Search provider name (default: "algolia") | 
| api | --search-api | ALGOLIA_API_PATH | search.api | Path to the client-side search API (default: "_search/api.js") | 
| indexSettings | - | - | search.indexSettings | Algolia index settings (searchable attributes, etc.) | 
| querySettings | - | - | search.querySettings | Algolia query settings (hits per page, etc.) | 
The extension can be used with the Diplodoc CLI by adding it to the extensions parameter:
npx -y @diplodoc/cli -i ./input-docs -o ~/output-docs --extensions @diplodoc/algolia-extension
export ALGOLIA_APP_ID="your-app-id"
export ALGOLIA_API_KEY="your-api-key"
export ALGOLIA_INDEX_NAME="your-index-name"
npx -y @diplodoc/cli -i ./input-docs -o ~/output-docs --extensions @diplodoc/algolia-extension
npx -y @diplodoc/cli -i ./input-docs -o ~/output-docs \
  --extensions @diplodoc/algolia-extension \
  --app-id "your-app-id" \
  --api-key "your-api-key" \
  --index-name "your-index-name" \
  --index
# .yfm file
search:
  provider: algolia
  appId: your-app-id
  # Do not include apiKey here for security reasons
  indexName: docs
  index: true
Then run:
# API key should be provided via environment variable or CLI flag
export ALGOLIA_API_KEY="your-api-key"
npx -y @diplodoc/cli -i ./input-docs -o ~/output-docs --extensions @diplodoc/algolia-extension
The extension provides a dedicated index command for indexing documentation without rebuilding it:
npx -y @diplodoc/cli index -i ~/output-docs --extensions @diplodoc/algolia-extension
This is useful when you want to update the search index without rebuilding the entire documentation. The index command processes the already built documentation and uploads it to Algolia.
Options for the index command:
npx -y @diplodoc/cli index -i ~/output-docs \
  --extensions @diplodoc/algolia-extension \
  --app-id "your-app-id" \
  --api-key "your-api-key" \
  --index-name "your-index-name"
The extension automatically generates the necessary client-side configuration for search:
<!-- This is automatically included in your documentation -->
<script src="_search/api.js"></script>
You can customize the search settings in your .yfm configuration file:
# .yfm file
search:
  provider: algolia
  appId: your-app-id
  indexName: docs
  index: true
  indexSettings:
    # Algolia index settings
    searchableAttributes:
      - title
      - content
      - headings
      - keywords
    attributesToHighlight:
      - title
      - content
  querySettings:
    # Algolia query settings
    hitsPerPage: 10
    attributesToRetrieve:
      - title
      - content
      - url
      - section
MIT
FAQs
Algolia search integration extension for Diplodoc
We found that @diplodoc/algolia-extension demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.