mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Put <title> and <base> in the <head> instead of <body>
This also means renderHTML() is no longer needed.
This commit is contained in:
@@ -199,6 +199,8 @@ extension DetailWebViewController: WKNavigationDelegate {
|
||||
struct TemplateData: Codable {
|
||||
let style: String
|
||||
let body: String
|
||||
let title: String
|
||||
let baseURL: String
|
||||
}
|
||||
|
||||
private extension DetailWebViewController {
|
||||
@@ -227,7 +229,7 @@ private extension DetailWebViewController {
|
||||
rendering = ArticleRenderer.articleHTML(article: article, extractedArticle: extractedArticle, style: style)
|
||||
}
|
||||
|
||||
let templateData = TemplateData(style: rendering.style, body: rendering.html)
|
||||
let templateData = TemplateData(style: rendering.style, body: rendering.html, title: rendering.title, baseURL: rendering.baseURL)
|
||||
|
||||
let encoder = JSONEncoder()
|
||||
var render = "error();"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<base href="">
|
||||
<style>
|
||||
</style>
|
||||
<script src="main.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user