-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add meta for toc in head link #710
base: master
Are you sure you want to change the base?
Conversation
src/utils/markup.ts
Outdated
@@ -46,13 +58,18 @@ export function generateStaticMarkup( | |||
const html = staticContent ? render(props) : ''; | |||
const isRTL = RTL_LANGS.includes(props.lang); | |||
|
|||
const headMeta = generateTags('meta', tocHead?.meta); | |||
const headLink = generateTags('link', tocHead?.link); | |||
|
|||
return ` | |||
<!DOCTYPE html> | |||
<html lang="${props.lang}" dir="${isRTL ? 'rtl' : 'ltr'}"> | |||
<head> | |||
<meta charset="utf-8"> | |||
${getMetadata(metadata, restYamlConfigMeta)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А вот это не дублирует headMeta чуть ниже?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Там только <script />
и <link rel="stylesheet" type="text/css" />
.
Те такой вариант дает менять стили в более гибком варианте. Хотя цель этого не дать добавлять стили, а дать добавить og
теги и другие теги для треков и интеграций с непостоянным наполнением ([name]="value').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Переделал решение под то что уже есть. Таким образом добавил опциональное поле tagName
для возможности проставить <${tagName} {...args} />
добавь, пожалуйста, тестов для добавления меты |
No description provided.