从帖子类创建自动分页类 HTML

问题描述

我有一个网站,我使用 GitHub Pages 选项上线,在我的网站上,我有 <section class="posts"> 存储一些 <article> 标签和我在其他页面中划分的那些文章,在每个页面的末尾我都有一个分页<div class="pagination">,但是这个分页我都是手动完成的,就像我自己拆分所有文章一样,将来这样做可能会很累。

今天的分页

                <!-- Footer -->
                    <footer>
                        <div class="pagination">
                            <!--<a href="#" class="prevIoUs">Prev</a>-->
                            <a href="index.html" class="page">1</a>
                            <a href="page2.html" class="page active">2</a>
                            <a href="page3.html" class="page">3</a>
                            <span class="extra">&hellip;</span>
                            <a href="#" class="next">Next</a>
                        </div>
                    </footer>

今天的文章

                    <section>
                        <article>
                            <header>                                        
                                <h2>Get file Metadata<br />
                                from PowerShell script</a></h2>
                            </header>
                            <a href="#" class="image fit"><img src="images/pic01.jpg" alt="" /></a>
                            <p>In this project I will show you how to get a file’s Metadata inside the Windows system using a PowerShell script.</p>
                            <ul class="actions special">
                                <li><a href="https://github.com/guimatheus92/Get-file-Metadata-from-PowerShell-script/tree/master" target="_blank" class="button">View Project</a></li>
                                <li><a href="https://guimatheus92.medium.com/get-file-Metadata-from-powershell-script-1676c5633394" target="_blank" class="button">View Article</a></li>
                            </ul>
                        </article>
                        <article>
                            <header>                                        
                                <h2>Convert Excel file to CSV<br />
                                from a PowerShell script</a></h2>
                            </header>
                            <a href="#" class="image fit"><img src="images/pic01.jpg" alt="" /></a>
                            <p>This project shows how to convert an Excel file using a PowerShell script.</p>
                            <ul class="actions special">
                                <li><a href="https://github.com/guimatheus92/Convert-Excel-file-to-CSV-from-a-PowerShell-script" target="_blank" class="button">View Project</a></li>
                                <li><a href="https://guimatheus92.medium.com/convert-excel-file-to-csv-from-a-powershell-script-3b998b9e8c2f" target="_blank" class="button">View Article</a></li>
                            </ul>
                        </article>
                    </section>

我对网络编程不太了解,但我如何才能完全自动地离开?
例如,为每 4 篇文章拆分每个页面(如下面的网站)。

我的网站:guilhermematheus.github.io/
本网站的回购:guilhermematheus.github.io GitHub Repo

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)