我想添加架构标签并将我的自定义 CSS 加载到某些特定页面的head 标签中,而不是全部,那么他们有什么简单的方法可以做到这一点,因为我不是编码员,有人可以帮我解决这个问题吗?
要添加自定义样式我使用下面的代码在默认安装vuepressindex.styl
下.vuepress/styles/
,以更新content__default
CSS类:
/**
* Custom Styles here.
*
* ref:https://v1.vuepress.vuejs.org/config/#index-styl
*/
.home .hero img
max-width 450px!important
.content__default
background-color #3df085
阅读您的评论后,我看到自定义布局是解决方案。
通过config.js
以下方式将标签添加到头部:
head: [
['meta', { name: 'theme-color', content: '#3eaf7c' }],
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
['meta', { 'property': 'og:type', 'content': 'article' }]
],
使用默认主题轻松定制:
#1 和 #2 的示例:
/博客/README.md
---
pageClass: blog-page
home: true
heroText: Hero Title
actionLink: /blog/
meta:
- name: description
content: blog page by abuabdellah
- name: keywords
content: super duper SEO
---
# Introduction
This is a test for a blog using v1 Vuepress
/guide/README.md
---
pageClass: guide-page
meta:
- name: description
content: guide page by abuabdellah
- name: keywords
content: super duper SEO
---
# Introduction
VuePress is composed of two parts
索引样式
.theme-container.blog-page
background-color blue !important
.theme-container.guide-page
background-color green !important
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句