If you end up with multiple pages, rather than the pagination thing you've got going on now, you might as well port the entire site to a Create-React-App project. Then you could use React Router (either HashRouter or BrowserRouter via this really cool trick). Also you could use React-Bootstrap, which I just really like. And you could template all the subsections with components, and probably use some React syntax highlighter plugin instead of GitHub gists.
If you end up with multiple pages, rather than the pagination thing you've got going on now, you might as well port the entire site to a Create-React-App project. Then you could use React Router (either HashRouter or BrowserRouter via this really cool trick). Also you could use React-Bootstrap, which I just really like. And you could template all the subsections with components, and probably use some React syntax highlighter plugin instead of GitHub gists.