mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Fix SEO and refactor HTML pages generation
* Split methods in multiple classes * Add JSONLD tags in embed too * Index embeds but use a canonical URL tag (targeting the watch page) * Remote objects don't include a canonical URL tag anymore. Instead we forbid indexation * Canonical URLs now use the official short URL (/w/, /w/p, /a, /c etc.)
This commit is contained in:
parent
e731f4b724
commit
f90db24233
23 changed files with 1876 additions and 1213 deletions
|
@ -7,7 +7,7 @@ import { About, CustomConfig, UserRight } from '@peertube/peertube-models'
|
|||
import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '../../helpers/audit-logger.js'
|
||||
import { objectConverter } from '../../helpers/core-utils.js'
|
||||
import { CONFIG, reloadConfig } from '../../initializers/config.js'
|
||||
import { ClientHtml } from '../../lib/client-html.js'
|
||||
import { ClientHtml } from '../../lib/html/client-html.js'
|
||||
import { apiRateLimiter, asyncMiddleware, authenticate, ensureUserHasRight, openapiOperationDoc } from '../../middlewares/index.js'
|
||||
import { customConfigUpdateValidator, ensureConfigIsEditable } from '../../middlewares/validators/config.js'
|
||||
|
||||
|
@ -94,7 +94,7 @@ async function deleteCustomConfig (req: express.Request, res: express.Response)
|
|||
auditLogger.delete(getAuditIdFromRes(res), new CustomConfigAuditView(customConfig()))
|
||||
|
||||
await reloadConfig()
|
||||
ClientHtml.invalidCache()
|
||||
ClientHtml.invalidateCache()
|
||||
|
||||
const data = customConfig()
|
||||
|
||||
|
@ -110,7 +110,7 @@ async function updateCustomConfig (req: express.Request, res: express.Response)
|
|||
await writeJSON(CONFIG.CUSTOM_FILE, toUpdateJSON, { spaces: 2 })
|
||||
|
||||
await reloadConfig()
|
||||
ClientHtml.invalidCache()
|
||||
ClientHtml.invalidateCache()
|
||||
|
||||
const data = customConfig()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue