Setting custom default records during installation

Hi,
Initial installation comes with default pages (Home, About Us, Contact). I would like to create my own default page and post records during installation and build. I see that there is a SiteTree.php file that contains the requireDefaultRecords() function in the Vendor folder. Is it possible to include or override this within my project? What would be the best way to acheive this?

As stated in the official documentation, you can overload that method to store whatever you want in the database.

If you do not want the default pages to be created, you can set create_default_pages to false (never done that but it should work). Add this to your YAML:

SilverStripe\CMS\Model\SiteTree:
    create_default_pages: false