html - 使用 Nuxt.js 从单个 HTML 页面预渲染多个页面
问题描述
我有一个提供的 HTML 文件,其内容位于单独的<section>
标签中。
我需要在构建期间使用 Nuxt(最好)或其他生成器将这些部分预渲染到单独的静态页面中。
提供的 HTML:
<html>
<head>
...
</head>
<body>
<header>...</header>
<section id="home">...</section>
<section id="features">...</section>
<section id="about">...</section>
<section id="contact">...</section>
<footer>...</footer>
</body>
</html>
在构建期间生成的静态页面:
index.html
, features.html
,about.html
和contact.html
每个页面都包含 common和<head>
content 。<header>
<footer>
我该怎么做呢?
对于上下文:提供的 HTML 来自站点构建器,因此我无法控制输出。我需要生成单独的静态页面,因为最终站点将托管在像 S3 这样的静态主机上。
解决方案
推荐阅读
- dataframe - 有什么方法可以在 Julia DataFrames 中快速收集分类特征?
- python - 为实例列表的所有成员调用任意类函数
- php - 如何使用 Laravel 获取客户端应用程序(不是用户)IP 或域 - Angular
- augmented-reality - 如何将带有MTL文件的OBJ转换为USDZ格式
- javascript - 有效地突出显示 gmail 消息中的单词
- teradata - teradata:将列名转换为列值
- java - 为什么不在设备上工作而在模拟器上工作?
- reactjs - getInitialProps 永远不会被调用......我做错了什么?
- ssl - 为什么 Azure VM 不提供 SSL?
- javascript - 设置 HTM5 文本会杀死 Chrome 中的滚动条拖动