02 / Working with pages
Choose the page for the job.
Use Markdown for notes and reference material. Use HTML when the page needs buttons, fields, or checkboxes you can click.
Automatic copy is unavailable. The full chapter Markdown is selected below; use your keyboard to copy it.
A reference or an interactive page.
Porthole renders neither format itself. It brings VS Code’s existing renderer into a floating window.
| HTML | Markdown |
|---|---|
| Rendered by VS Code’s integrated browser. | Rendered by VS Code’s Markdown preview. |
| Use buttons, text fields, and interactive checklists. | Use readable notes, instructions, and reference material. |
| The page’s scripts provide its behavior. | The preview is read-only. Task-list boxes cannot edit the file. |
| Save the file to update the rendered page. | The preview updates as you edit the file. |
Write an HTML page for a small window.
Give it a useful title, such as:
<title>[my-project] Release checklist</title>
VS Code shows the page’s title in the floating window. A project name helps distinguish several pages at a glance.
Keep the page readable at about 420–640 pixels wide. Let paragraphs wrap, keep buttons large enough to use, and make long commands scroll within their own block.
A page can use its own localStorage to remember checklist state when the same file is reopened. The page supplies that behavior; Porthole does not add it.
Choose Markdown colors.
porthole.markdown.colorScheme accepts three values:
autofollows VS Code’s theme. This is the default.lightgives the Markdown page light colors.darkgives it dark colors.
The colors follow the file. While it is popped out, every preview of that file uses the chosen scheme, including a preview docked in the main window. Previews of other files keep following VS Code’s theme. Code blocks retain VS Code’s syntax colors.
Need a checklist you can tick? Markdown task-list boxes are read-only in the preview. Use HTML when the person following the steps needs to click, type, or press a button.
Start from the local file.
Porthole opens local HTML and Markdown files. It does not yet pop out a page already open in a browser tab, a web address, or a localhost URL. Remote and virtual workspaces are outside the supported scope.
To bring a page forward again, pop out the same file. Porthole finds its existing floating window instead of opening another.