Preview and site settings

41 views
Skip to first unread message

Tim Gray

unread,
Jul 19, 2025, 3:14:37 PMJul 19
to BBEdit Talk
Is there anyway to specify default html templates, CSS, and filters for the 'preview in BBEdit' command on a per-site/project basis?

It appears that the preview menu does seem to remember these settings for a given page, but when I'm editing a website, I'd love for all the pages to use the same preview CSS for example.

Thanks

Ulrich Kapp

unread,
Jul 20, 2025, 1:21:06 AMJul 20
to BBEdit Talk
Hi Tim,
as you mentioned, there's the Project Settings doing this. You can find them in the bottom left corner of your BBEdit window, under the little "rainy cloud"-Symbol.
There you can define your local site root and how the links in the HTML-Files will be related to it. Correct settings there should fix most of your problems.
The preview will follow all correct links to other files, including JavaScript and CSS definition in the HTML-header.

But using the built-in preview of BBEdit, mention that the preview isn't a web server al all. It's only a WebKit-window.
All HTML, CSS3 and JavaScript things will work correctly (because they work in the browser window itself), but if you use any techniques like PHP, Python, Perl, other CGI techniques, server side JavaScript etc., the internal preview is insufficient.
Then you have to install a local web server (most commonly apache using MacPorts or Brew) or you have to deploy the site to an external web server in the on the LAN or internet to check the correct function of your site.

Hope the answered your question.

Have a nice Sunday, best wishes, Ulrich
Reply all
Reply to author
Forward
0 new messages