' . esc_html( CFSP_Settings::source_url() ) . '. Choose what that address turns into on the static site.' ); CFSP_UI::select( 'url_mode', 'Link style', array( 'absolute' => 'Full address (https://…)', 'relative' => 'Root-relative (/…)', ), array( 'help' => 'Full addresses are best for SEO: canonical tags, sitemaps and social previews stay complete.' ) ); CFSP_UI::input( 'destination_url', 'Static site address', array( 'type' => 'url', 'placeholder' => 'https://www.example.com', 'show_if' => 'url_mode=absolute', 'help' => 'The address visitors use, e.g. https://your-project.pages.dev or your own domain.', ) ); CFSP_UI::input( 'relative_path', 'Site folder', array( 'placeholder' => '/', 'show_if' => 'url_mode=relative', 'help' => 'Leave as / when the site lives at the root of its domain. Use /blog for example.com/blog/.', ) ); CFSP_UI::toggle( 'force_replace', 'Rewrite every occurrence', array( 'help' => 'Also rewrites addresses inside inline CSS, scripts and JSON. When off, only links in attributes such as href, src and srcset change.' ) ); CFSP_UI::card_end(); CFSP_UI::card_start( 'Page discovery', 'How Static Push finds everything to export. Styles, scripts, images and fonts used by your pages are always included.' ); CFSP_UI::toggle( 'enhanced_crawl', 'Use the WordPress database', array( 'help' => 'Lists content straight from WordPress instead of relying only on links, so nothing is missed.' ) ); CFSP_UI::tags( 'crawlers', 'Include', CFSP_Settings::crawler_options(), array( 'show_if' => 'enhanced_crawl' ) ); CFSP_UI::tags( 'post_types', 'Content types', CFSP_Settings::post_type_options(), array( 'show_if' => 'enhanced_crawl', 'help' => 'Only these are exported, and only these trigger automatic pushes.', ) ); CFSP_UI::toggle( 'follow_links', 'Follow links between pages', array( 'help' => 'Also exports pages that are only reachable through links.' ) ); CFSP_UI::toggle( 'comment_feeds', 'Comment feeds for every post', array( 'show_if' => 'enhanced_crawl', 'help' => 'Each post has its own /post-name/feed/. Leaving this off roughly halves the number of files.', ) ); CFSP_UI::card_end(); CFSP_UI::card_start( 'Feeds and 404 page', 'How RSS feeds and the not-found page are published.' ); CFSP_UI::toggle( 'feed_xml', 'Save feeds as feed.xml', array( 'help' => '/feed/ becomes /feed.xml (category feeds too), every link to a feed is updated, and the old addresses redirect to the new ones.' ) ); CFSP_UI::toggle( 'feed_style', 'Style feeds for browsers', array( 'help' => 'Adds a small script tag to every feed and publishes /rss-style.js, so a feed opened in a browser shows a readable page with clickable posts. Feed readers and search engines ignore it. This replaces the old XSLT stylesheet, which browsers are removing.' ) ); CFSP_UI::toggle( 'feed_no_footer', 'Remove "appeared first on" line', array( 'help' => 'Yoast SEO adds "The post … appeared first on …" to every feed item. This turns it off (also in WordPress\'s own feed).' ) ); CFSP_UI::textarea( 'feed_css', 'Extra CSS for the feed page', array( 'rows' => 6, 'show_if' => 'feed_style', 'placeholder' => 'a.title { color: #21b68e; }', 'help' => 'Optional. Added after the built-in styles of the feed page. The page uses the Inter fonts at /font/ when your site has them.', ) ); CFSP_UI::notice( '404 page: Static Push asks WordPress for your theme\'s real 404 template, even when a plugin redirects missing pages to the home page, and marks it noindex. If the theme can\'t provide one, a clean built-in page is used.', 'info' ); CFSP_UI::card_end(); CFSP_UI::card_start( 'Sitemaps', 'How XML sitemaps look and where /sitemap.xml goes on the static site.' ); CFSP_UI::toggle( 'sitemap_redirect', 'Redirect /sitemap.xml to the sitemap index', array( 'help' => 'Visitors and bots asking for /sitemap.xml get a 301 redirect to /sitemap_index.xml (Yoast, Rank Math) or /wp-sitemap.xml (WordPress), whichever was exported. Cloudflare Pages only.' ) ); CFSP_UI::toggle( 'sitemap_style', 'Style sitemaps for browsers', array( 'help' => 'Adds a small script tag to every sitemap and publishes /main-sitemap.js, so a sitemap opened in a browser shows a readable table. Search engines ignore it. The SEO plugin\'s XSLT stylesheet line is removed either way, because browsers are removing XSLT.' ) ); CFSP_UI::textarea( 'sitemap_css', 'Extra CSS for the sitemap page', array( 'rows' => 6, 'show_if' => 'sitemap_style', 'placeholder' => 'th { background: #eef6f3; }', 'help' => 'Optional. Added after the built-in styles of the sitemap page.', ) ); CFSP_UI::card_end(); CFSP_UI::card_start( 'Extra and excluded', 'Fine-tune exactly what ends up on the static site.' ); CFSP_UI::textarea( 'extra_urls', 'Extra pages', array( 'rows' => 4, 'placeholder' => "/landing-page/\n/wp-content/uploads/brochure.pdf", 'help' => 'One address per line, for pages nothing links to.', ) ); CFSP_UI::textarea( 'extra_files', 'Additional files and directories', array( 'rows' => 4, 'placeholder' => "wp-content/uploads/downloads\n" . CFSP_Paths::home_dir() . 'google1234abcd.html', 'help' => 'One per line: a path inside ' . esc_html( untrailingslashit( CFSP_Paths::home_dir() ) ) . ' (like /font/ or android-chrome-192x192.png), a full server path, or a site address. Folders are copied with everything inside. PHP files and dotfiles are always skipped. Added on full pushes.', ) ); CFSP_UI::textarea( 'exclude_patterns', 'Skip addresses containing', array( 'rows' => 6, 'help' => 'One piece of text per line. Any address that contains it is left out.', ) ); CFSP_UI::card_end();