To improve as a developer, you must focus on three things: learning, reading, and writing. Or, in other words, learn from somebody more seasoned than you; read a lot of code; and write your own code daily. This series will focus on the reading component. Together, we’ll mentally parse an open source
source code as the basis for our learning in this series. This code is freely available to review on GitHub. Specifically, we’ll focus on the documentation layer. We see all these markdown files for each page of documentation. How are they loaded, parsed, and presented on the page? And how is versioning handled? We’ll decode all of it. To begin this journey, however, we must first get the laravel.com source code running locally.
Now that we have the application running locally, let’s figure out how a documentation page is loaded. We already know that each section is stored as a Markdown file. So how exactly are the files loaded and presented to the user?
It seems that, at some point, the companion Markdown for a requested documentation page is loaded, compiled, and cached. In this episode, let’s figure out exactly how that workflow is organized and processed.
We’ve figured out how the Markdown files are loaded, and parsed. The only remaining step is to get the content on the page. In this episode, we’ll learn how the content is passed to the view, while accounting the situations when an invalid documentation page is requested.