How to Automatically List SharePoint Site Pages in a Table of Contents
Question details
The user wants to automatically display a list of site pages, functioning as a Table of Contents, on a SharePoint modern site's home page.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Organizing and displaying newly added wiki or site pages dynamically on a SharePoint home page.
- Observed behavior
- The user aims to automate the listing of site pages so that new pages appear dynamically in a Table of Contents or hierarchical tree structure without manual updates.
Ensure you have Edit permissions for the SharePoint site home page and that the pages you want to list have been published rather than just saved as drafts.
Use the Highlighted Content Web Part
The Highlighted Content web part dynamically aggregates and displays pages from your site, automatically updating the list as new pages are created.
Modern SharePoint sites support web parts that automatically filter and list content. By configuring the source and layout, you can create an auto-updating Table of Contents for your site pages.
Navigate to your SharePoint home page and click the 'Edit' button located at the top right corner of the screen.
Hover your cursor over or below an existing web part section, click the '+' icon to open the web part menu, and search for 'Highlighted content'.
Click the 'Edit web part' (pencil icon) next to the newly added Highlighted Content web part. In the property pane on the right, set the 'Source' to 'The page library on this site' and set 'Type' to 'Pages'.
Scroll down the property pane to choose a layout like 'List' or 'Compact' to resemble a traditional Table of Contents. Finally, click 'Republish' at the top right of the page to apply your changes.

Create a Custom Navigation Tree Structure
For a true hierarchical tree structure similar to a classic wiki Table of Contents, you can organize pages using custom site navigation.
Need a robust document editor for your SharePoint files? Try WPS Office
While organizing your SharePoint site pages, you may need a reliable office suite to create, read, and edit attached documents. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office, featuring a familiar interface and seamless migration.
- 1. Download and Install WPS Office: Visit the official WPS website, download the free installer, and complete the installation process in minutes.
- 2. Open Your SharePoint Documents: Sync your SharePoint document library to your PC using OneDrive, then open your .docx, .xlsx, or .pptx files directly within WPS Office.
- 3. Edit and Save Seamlessly: Use the familiar ribbon interface to edit your documents. When you click save, changes will automatically sync back to your SharePoint site.

Frequently Asked Questions
Can I filter which SharePoint pages appear in the Highlighted Content web part?
Yes. In the web part's property pane, you can use the 'Filter' and 'Sort' options to include or exclude pages based on specific words in the title, custom metadata properties, or recently added status.
Why are my newly created site pages not showing up in the web part instantly?
The Highlighted Content web part relies on SharePoint search indexing. It may take a few minutes for newly created or modified pages to be crawled and displayed. Additionally, ensure the page is fully published and not just saved as a draft.
Is there a built-in 'Tree View' web part in modern SharePoint?
Modern SharePoint sites do not have the classic 'Tree View' web part natively available. To achieve a hierarchical view, you must use grouped library views, build custom navigation menus, or rely on third-party web parts.




