To add an icon to the page title, we need to edit the PageTitle.tsx component. The relative path to this file from the root is quartz/components/PageTitle.tsx.
Modified Code
Here’s the modified code in PageTitle.tsx, with added comments to highlight the changes:
When adding the icon, make sure to update the src attribute with the correct file path. If the icon is already on your site, use the relative path as shown in the example. If you want to use a new icon, you have two options:
Use a URL if the image is hosted online (e.g., src="https://via.placeholder.com/24").
Add the image to your site (e.g., in the /static folder) and use the relative path in the code (e.g., src="/static/your_custom_icon.png").