如何使WordPress主题附带页面?

I'm developing a WordPress theme and with it will come a few pages. More specifically, what I want is to put in my functions.php the code that will do the same as if I had gone into the Pages section of the GUI and created a new page Some Page with permalink http://mywebsite.com/somepage.php. I'm not sure how to do this because the WordPress documentation for the its API is not very helpful for looking up how to do this. But from my experience using the WordPress API so far, I'm guessing there's something like

add_page('Some Page', 'generate_some_page', 'http://mywebsite.com/somepage.php'); 

function generate_some_page ( ) 
{
    /* 
     echo the HTML that will go inside the <div id="content"> in the layout
        <?php get_header(); ?>
        <div id="main">
            <div id="content">
               <!--  ... -->
            </div>
        </div>
         <?php get_footer(); ?>
    */
} 

Do you have any idea what WP API call I'm looking for? Or any link to relevant documentation that I can read?

Have a look at wp_insert_post

https://codex.wordpress.org/Function_Reference/wp_insert_post

$page_data = array(
    'post_name'         => 'my-page-name',
    'post_title'        => 'My Page Name',
    'post_content'      => 'This is the content of my page.',
    'post_excerpt'      => 'This is the excerpt of my page.'
);
$page_id = wp_insert_post( $page_data );