Skip to navigation

Role-based access control in local preview

fern docs dev now applies role-based access control the same way a preview link does. Use the role selector to view the site as a specific viewer and check which pages and navigation items each role sees. Password protection also works locally when you set FERN_AUTH_TYPE=password and FERN_AUTH_SECRET before starting the server.

Read the docs

You can now keep PostHog analytics off until a visitor consents. Set settings.require-analytics-consent: true in docs.yml, then report consent from your consent manager’s callback (for example, Ketch or OneTrust) by setting window.fernAnalyticsConsent and dispatching a fern-analytics-consent event. Until consent is granted, Fern’s built-in PostHog analytics and your own PostHog instance load no scripts, set no cookies, and send no events. Revoking consent turns PostHog off and removes its cookies and storage keys.

Read the docs

Choose the default version

You can now mark any entry in versions with default: true to make it the version served at your unversioned URLs, instead of relying on the first entry in the list. List order still sets the order of the version dropdown, so a preview or development version can appear first while a stable release keeps the canonical URLs, sitemap, and search. The flag also works in product versions.

Read the docs