Better code syntax highlighting, custom links for your site logo and more

18 November: With this release, we’ve added Shiki syntax highlighting for code blocks, added a customizable link for your site logo, a new block switching menu, and more

You can now set a custom link for the logo in the top-left corner of your published docs site.

By default, clicking the logo or site title will lead users back to the first page of your docs site. But you can now set a custom URL outside your site — or a page, section or variant on your site — to be opened instead. If your docs are part of a larger website, this can help visitors navigate back to your own landing page

To set a custom link, open your site’s Customization settings and switch to the Configure tab. In the Primary link section, add the URL you want your logo to link to.

Shiki syntax highlighting in code blocks

Code blocks in the editor now use Shiki for syntax highlighting, so they’ll render much more consistently with code blocks in your published docs.

That means that your code blocks won’t just have great performance. They’ll also match the same highlight colors as in your published docs — including your site’s custom primary and semantic colors.

Switch block types faster

We’ve added a new option to our inline palette that lets you quickly switch block types with a couple of clicks.

Simply highlight some text in a block and, in the palette that appears, use the dropdown menu to select a block to turn it into. It’s as simple as that!

Improved
  • It’s now easier to see which block you’re going to move or edit. When you hover over the Block options button, the block it’s related to will appear highlighted in the editor. This is particularly useful for nested blocks — such as when you add text, images and code within a stepper block — as you can see precisely which block you’re going to affect before you open the menu.

  • We now prioritize search results in the end-user’s current site section when searching in published docs sites. So if you search in your help center section, you’ll see relevant results from the help center, followed by results from other sections on your site.

Fixed
  • Fixed a bug that would cause the cards dialog to crash when viewing hidden fields on a card with a cover image set to fit.

  • Fixed a bug that prevented you from being able to copy text from a comment and paste it into the editor with Cmd + V. You can now paste text as expected.

  • Fixed a bug that prevented Git Sync from installing on a space with more than 10 integrations installed.

  • Fixed a crash and invalid API output that would happen when a space revision contains recursive computations.

  • Fixed an issue that let you recursively create translations of the current space.

  • Fixed some small issues in the backend that clean up non-existent pages and patch existing pages during indexation.

  • Fixed a bug that meant page covers and page links sometimes weren’t properly resolved during the translation process.

  • Fixed an issue that meant hint blocks nested within lists were not being imported or exported correctly when using Git Sync.


We’re constantly working to improve the way you and your team work in GitBook, and value your input on features, bugs, and more. Make sure you head to our official GitBook community to join the discussion.

Last updated

Was this helpful?