GuidePremium
The Blade front end for CoullWorks Blog for Laravel
Install and configure the server-rendered Blade pages, choose the Tailwind or Bootstrap view set, set every key in the blade config, and control embed consent.
Updated 16 November 2026Back to the package pageBuy
The Blade front end is the default. It draws the blog home page, article, category, tag, author, archive, search and not-found pages, and serves the feed and the sitemap. Every page is server-rendered HTML, so it works without JavaScript and is read by search engines as it is.
Turn it on and see it#

The Blade home page at 1440 pixels: header with the blog name, Home and Search; the All pill selected among the category pills; the lead post with its image on the left; a three-column grid below; the footer with the copyright line and the RSS feed link.
- Open
config/coullworks-blog.php(publish it withphp artisan vendor:publish --tag=cwb-configif it is not there). - Set
'frontend' => 'blade'. This is already the default. - Open the blog address in a browser. The pages are styled at once: the package ships the compiled stylesheet, so there is nothing to build.

The home page on a phone: the category pills wrap onto two lines and the cards stack in one column.
The pages are described one by one in Views you can override. The layout around them is in Tokens and theming.
Choose the view set: Tailwind#

The article page from the Tailwind view set. The rail on the left holds On this page, Key takeaways and About the authors; the text sits in the column on the right.
coullworks-blog.blade.framework chooses the view set. Allowed values are tailwind (the default) and bootstrap. Both sets draw the same pages with the same element tree. Only the class names differ.
With Tailwind there are two ways to style the blog.
- Use the shipped stylesheet (default). The package serves
dist/blog-tailwind.css, compiled from its own views with only the classes they use, plus the tokens, the adapter andblog.css. The default layout links it at/vendor/coullworks-blog/blog-tailwind.css. Runphp artisan cwb:blade-installonce and the file is published topublic/vendor/coullworks-blog/, so your web server can serve it directly. Run the command again after you update the package. - Build the classes with your own Tailwind 4. Set
coullworks-blog.blade.compiled_csstofalse. The layout then links onlytokens.cssandblog.css. Tailwind 4 does not scan thevendordirectory, so tell it where the views are. Runphp artisan cwb:blade-install: it prints the@sourceline and the adapter import to add toresources/css/app.css. Or publish the views withphp artisan vendor:publish --tag=cwb-blade-views-tailwindand your own build scans them. The adapter maps the--cw-*tokens into your Tailwind@theme.
Choose the view set: Bootstrap 5#

There is no separate Bootstrap capture in the gallery. This is the Tailwind capture of the same page; the Bootstrap set draws the same element tree and takes its colours and sizes from the same tokens.
Set coullworks-blog.blade.framework to bootstrap. Nothing to build and no Bootstrap of your own to load: the package ships dist/blog-bootstrap.css (Bootstrap 5.3.8, then the tokens, the adapter and blog.css) and the default layout links it. No Bootstrap JavaScript is used.
To reuse the Bootstrap your application already loads:
- Set
coullworks-blog.blade.compiled_csstofalse. - Run
php artisan vendor:publish --tag=cwb-blade-tokens --tag=cwb-blade-adapters --tag=cwb-blade-js. - Load the published
tokens.css,adapter-bootstrap.cssandblog.cssafter Bootstrap's CSS, all frompublic/vendor/coullworks-blog/.
The Bootstrap --bs-* variables then drive the tokens, and data-bs-theme="dark" switches the blog to its dark colours.
Every key in the Blade config#
Publish the file with php artisan vendor:publish --tag=cwb-blade-config. It is written to config/coullworks-blog-blade.php. The same keys can instead be set in the blade array inside config/coullworks-blog.php, and that array wins.
| Key | Default | Allowed values | What it changes |
|---|---|---|---|
framework | tailwind | tailwind, bootstrap | The view set every page and component uses |
compiled_css | true | true, false | true: the layout links the stylesheet the package ships. false: it links tokens.css and blog.css only, for a host that builds its own classes |
layout | null | a Blade layout name, or null | Your own layout. It must @yield('content') and @stack('cw-head'). null uses the package layout |
middleware | ['web'] | a list of middleware names | Route middleware, run before the package's blog, licence and preview middleware |
max_age | 0 | seconds | Browser cache lifetime of public pages. 0 means the browser asks again with the ETag on every visit, so a post published a moment ago is never hidden |
s_maxage | 600 | seconds | How long a CDN or proxy may keep a public page |
rail | true | true, false | Whether a post left on "Blog default" uses the rail layout. Applies until the setting template.default is stored; after that the setting decides |
featured_count | 1 | 0 to 3 | How many featured posts the home page shows as lead cards |
load_more | false | true, false | true: listings end with a Load more link to the next page instead of numbered pagination |
components.search | cw::search-form | a Blade component name | The search box. Livewire replaces it with cwl::search |
components.pagination | cw::pagination | a Blade component name | The numbered pager. Livewire replaces it with cwl::pagination |
components.load_more | cw::load-more | a Blade component name | The Load more link. Livewire replaces it with cwl::load-more |
components.list | cw::list | a Blade component name | The list wrapper under a listing. Livewire replaces it with cwl::list |
preview_pattern | {locale}/preview/{token} | a URL pattern | Used for the preview route when the core preview pattern has no {token} |
consent_cookie | cwb_consent | a cookie name | The first-party cookie that holds the reader's embed consent |
share | x, linkedin, facebook, bluesky, email | any of those, in the order to show | The share links on an article |
recent | 5 | a whole number of 1 or more | How many posts the Recent posts widget lists |
Public pages carry an ETag and Cache-Control headers built from max_age and s_maxage. A preview page is never cached publicly.
Embed consent#

What a reader sees in place of an embed before consenting: a grey box saying the content is hosted by Spotify and that loading it shares data with them, with one orange button, Load Spotify content.
Video (YouTube and Vimeo) and Embed blocks never send a reader's browser to the provider until the reader agrees. The page shows the notice above instead. Agreeing works like this.
- The reader presses the button. The page script adds the provider name to a cookie, loads the player in place, and shows a revoke link in the footer.
- The cookie is named by
blade.consent_cookie(cwb_consentby default). Its value is a comma-separated list of provider names. It lasts 365 days, applies to the whole site and isSameSite=Lax. - On the next visit the player loads at once for every provider in the cookie.
- The reader can withdraw consent with the revoke link in the footer, which clears the cookie and reloads the page.
On the server, the default checker is DenyAllConsent: a server-rendered page never carries a provider address. If your site already has a cookie banner, either write the provider names into this cookie from your banner, or bind your own class to the ConsentChecker contract so the server may render the player directly. The contract is in the contracts reference. Which providers are allowed at all is set in Settings under Allowed providers.
The layout#
The default layout is a skip link, a header with the blog name and the Home and Search links, a main region and a footer with the copyright line and the feed link. To use your own, set blade.layout to your Blade view. It must contain @yield('content') and @stack('cw-head'). The head tags (title, canonical, hreflang, structured data) are pushed into cw-head, so leave that stack in your <head>. The page slots you can fill are described in Views you can override.
Screenshots of the Bootstrap view set#
The Bootstrap set draws the same pages as Tailwind with Bootstrap's own look: links are blue on a white page where Tailwind uses an orange accent on a grey one. 
The Blade Bootstrap listing on a 1440 px window.

The Blade Bootstrap listing at 390 px: the category pills wrap and the posts stack in one column.

The Blade Bootstrap article page at 1440 px.

The Blade Bootstrap article page at 390 px. The contents sit in a collapsed On this page control.

The Blade Bootstrap search page showing the one result for "tent".

The Blade Bootstrap Figure lightbox open. The same dialog is used in every front end.







