Displaying recent post excerpts on static front page

I’ve found the solution. According to https://codex.wordpress.org/Function_Reference/the_content#Overriding_Archive.2FSingle_Page_Behavior, one must add

global $more;
$more = 0;

before the call to the_content(). So now my inner loop reads:

<?php
$recent_posts_query = new WP_Query(array('post_type' => 'post', 'posts_per_page' => 5));

while ($recent_posts_query->have_posts())
{
$recent_posts_query->the_post();
?>
<div class="post">
<h3><?php echo the_title(); ?></h3>
<p>by <?php the_author(); ?></p>
<?php
global $more;
$more = 0;
the_content();
?>
</div>
<?php
}
?>