[WordPress] 外掛分享: QuantCDN

首頁 › 外掛目錄 › QuantCDN
100+
安裝啟用
—
尚無評分
14 天前
最後更新
—
問題解決
WordPress 6.0+ PHP 8.2+ v2.0.7 上架:2020-09-30

內容簡介

QuantCDN 是專門為靜態網頁製作的 CDN。此外掛程式作為靜態網站產生器,讓您輕鬆地透過單一點擊來推送整個 WordPress 網站的靜態副本。任何進行中的內容更改都會自動推送,確保您在 QuantCDN 站點邊緣的靜態網站始終保持同步。

完整支援:
* 頁面和文章
* 首頁(靜態或列表),包括分頁
* 存檔(包括分頁)
* 404 錯誤頁面
* 自訂路由
* 標籤和分類(包括分頁)
* 附加的圖像和媒體、CSS、JavaScript
* 自訂文章和頁面類型

QuantCDN 平台支援整合了表單和搜尋。

需要一個 QuantCDN 帳戶

WP-CLI 支援

WP-CLI 是一個與 WordPress 互動的命令行工具。它是最初將 WordPress 網站種子放置於 Quant 中的推薦方式,並比使用 UI 提供大量的效能改進。

這主要是由於具有並行運行種子處理的能力,與使用 UI 相比,可以立即大幅提高 10 倍(或更高)的效能。

使用 wp quant info 檢視佇列狀態
使用 wp quant reset_queue <queue_name> 重設佇列
使用 wp quant process_queue <queue_name|all> --threads=10 將內容推送至 Quant

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0.7) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「QuantCDN」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

QuantCDN is a CDN engineered for the static web. This plugin works in two modes:

Static Site: every page, listing, file and redirect is rendered and published to the Quant edge. Content changes are pushed automatically. Visitors never reach WordPress.
CDN Only: WordPress serves pages behind Quant, and the plugin purges the Quant cache when content changes.

Static mode publishes:

Posts, pages and public custom post types
The home page, blog listing, category, tag and custom taxonomy pages, author pages, date and post type archives, including every paginated page
Media library files with all image sizes, theme assets, and every stylesheet, script, image or document a page references
Custom routes, the 404 page, robots.txt and sitemaps (WordPress core, Yoast SEO, Rank Math)
Redirects from the Redirection plugin and from changed post slugs
Quant Search records, so the Quant Search pages and autocomplete box work on the static site

Also included:

A React admin under QuantCDN with a dashboard, content browser, cache purge, search configuration, settings and diagnostics
Sync status in the post lists and the admin bar, with a “Push to Quant” row action
Login with your Quant account to pick a project, or paste the project credentials
QuantGov support: set the endpoint to https://api.quantgov.cloud
WP-CLI commands for scripted pushes and purges, with parallel workers
Background processing with WP-Cron and an optional scheduled re-push
Configuration from QUANT_* environment variables for Quant Cloud

The QuantCDN platform provides forms and search for static sites.
Requires a QuantCDN account.
Upgrading from 1.x
Version 2.0 keeps your settings. On the first page load after the update the plugin copies the 1.x settings (API credentials, automatic push, cache purge on save, webserver URL and host, 404 route, custom routes, relative rewrite domains and cron settings) to the new format. Content pushes continue to work without any action. A notice links to a review page.
The 1.x WP-CLI commands wp quant info, wp quant reset_queue and wp quant process_queue --threads=N keep working.
Version 2.0 requires PHP 8.2. Sites on older PHP are not offered the update and stay on 1.6.
WP-CLI

wp quant status – connection, mode and queue counts
wp quant sync --all --process – queue the whole site and push it
wp quant sync --type=page – queue one content type (post, page, media, taxonomy, home, archives, authors, theme_assets, custom_routes, sitemaps, redirects, search, or a custom post type)
wp quant sync 123 456 --process – push specific posts
wp quant queue process --all --threads=5 – process the queue with parallel workers
wp quant queue status|retry|clear|errors
wp quant purge /path and wp quant purge --all
wp quant unpublish /path
wp quant search --clear --process – rebuild the Quant Search index

Environment variables
Set these to configure the plugin without the admin UI (for example on Quant Cloud): QUANT_API_ENDPOINT, QUANT_CUSTOMER, QUANT_PROJECT, QUANT_TOKEN, QUANT_WEBSERVER_URL, QUANT_WEBSERVER_HOST, QUANT_ENABLED, QUANT_PURGE_ON_SAVE, QUANT_DISABLE_TLS_VERIFY, QUANT_HTTP_REQUEST_TIMEOUT, QUANT_MODE. The same names work as PHP constants in wp-config.php. Overridden fields are read-only in the UI.
QUANT_HTTP_REQUEST_TIMEOUT is the time in seconds that the plugin waits for one answer from the Quant API (default 30, minimum 5). It is the same value as "HTTP request timeout" on the Settings page. File uploads, and pages larger than 512 KB, always get at least 120 seconds. The connection itself must open within 10 seconds (the WordPress HTTP API default). Increase the value if a slow network makes pushes fail with "Quant did not answer in time":

define('QUANT_HTTP_REQUEST_TIMEOUT', 60);

Styling the search page
The search page (the page the plugin creates, the “Quant Search” block and the [quant_search] shortcode) uses the theme’s fonts and text colour. Result titles are in the text colour and are underlined on hover and focus. Lines, count badges, tags and secondary text are mixes of the text colour, so the page also works on a dark theme. The plugin’s own rules apply only inside .quant-search; the bundled InstantSearch.js theme styles the ais- widget classes.
To restyle the page, set these custom properties on .quant-search in the theme stylesheet or in Additional CSS (Appearance > Editor > Styles in a block theme, Appearance > Customize in a classic theme). The plugin defaults have no specificity, so a rule on .quant-search wins in any stylesheet order.
.quant-search {
--quant-search-accent: #1d4ed8;
--quant-search-gap: 1.25rem;
--quant-search-facets-width: 16rem;
}

Spacing and layout:

--quant-search-gap (1rem): the base space. The other spaces are multiples of it, so a change here scales the page.
--quant-search-gap-xs, -sm, -md, -lg, -xl (0.25, 0.5, 0.75, 1.5 and 2.5 times the gap). -xl is the space between the facets and the results.
--quant-search-facets-width (14rem): the width of the facet column.
--quant-search-content-min-width (20rem): the results column is never narrower than this next to the facets.
--quant-search-hit-image-width (7.5rem): the result thumbnail width.
--quant-search-radius (0.375rem): the corner radius of the search box, buttons, pagination and thumbnails.

Colours:

--quant-search-accent: the checked boxes, the search box border on focus, the current page and the focus ring. Default: the block theme’s contrast colour, or the text colour.
--quant-search-muted: secondary text (result summaries, counts, tags, the result count). Default: 75% of the text colour.
--quant-search-border, --quant-search-border-strong: lines and control borders (18% and 45% of the text colour).
--quant-search-surface, --quant-search-surface-hover: the count badge and tag background, and the hover background (6% and 10% of the text colour).
--quant-search-input-background (transparent): the search box and select background.
--quant-search-highlight: the background of the matched words.
--quant-search-focus-ring (the accent) and --quant-search-focus-width (2px): the focus outline of every link, button and field.
--quant-search-disabled-opacity (0.55): disabled buttons and pagination links.

Type (relative to the theme’s text size):

--quant-search-hit-title-size (1.25em) and --quant-search-hit-summary-size (0.9375em): the result title and summary.
--quant-search-facet-heading-size (0.75em): the facet headings.
--quant-search-font-size-small (0.875em) and --quant-search-font-size-xsmall (0.8125em): the result count, the “Clear refinements” button, counts and tags.

When the search area is narrower than 37.5rem (for example on a phone), the facets move above the results, side by side when there is room. A facet with no values for the current search is hidden with its heading.
For larger changes, target the classes. They are stable: quant-search, quant-search__description, quant-search__facets, quant-search__clear, quant-search__facet, quant-search__facet-heading, quant-search__content, quant-search__box, quant-search__stats, quant-search__hits, quant-search__hit, quant-search__hit-title, quant-search__hit-summary, quant-search__hit-tag, quant-search__pagination, quant-search__empty, quant-search__fallback (the search form without JavaScript) and quant-search--unavailable. The widgets inside them use the InstantSearch.js ais- classes, for example ais-SearchBox-input, ais-RefinementList-label, ais-RefinementList-count, ais-ClearRefinements-button and ais-Pagination-link.

延伸相關外掛

文章
Filter
Mastodon