Skip to content
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

seo优化后 主页特殊标签失效 #1058

Open
abc1763613206 opened this Issue Mar 10, 2019 · 7 comments

Comments

Projects
None yet
3 participants
@abc1763613206
Copy link
Collaborator

commented Mar 10, 2019

首先,十分欢迎你来给 OI WIki 开 issue,在提交之前,请花时间阅读一下这个模板的内容,谢谢合作!

  • 请确认已经读过了 F.A.Q.(确认过后请将选项打钩 / 填为 [x]

  • 是出现了什么问题?(最好截图)

主页特殊标签失效,gitalk没有被禁用

  • 你是否正在着手修复?

在校修不了 cue一下@Ir1d@Himself65

  • 如何复现?

首页底部

issue 标题请写为 要汇报的主要内容

@abc1763613206

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 10, 2019

@Ir1d 看样子要跳过index文件?

@Himself65

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2019

@abc1763613206 自己加ignore files

@Himself65

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2019

} else if (stat.isFile() && /.md$/.test(file)) {
// // if file is file
let data = fs.readFileSync(pth, { encoding: 'utf-8' })

const ignoreFiles = [
  /^index/
]
// ......
if (ignoreFIles.some(regex => regex.test(file))) {
  return
}
@Ir1d

This comment has been minimized.

Copy link
Member

commented Mar 10, 2019

我觉得应该在脚本里判断一下如果md文件本身有meta就不要插入分隔符?
维护这个 ignoreFiles 会很费劲吧

@Himself65

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2019

应该可以搞到在build之前处理这些preload脚本,而而且不会影响到源文件,但是我不掌握python垃圾python)就懒得研究了

@abc1763613206

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 10, 2019

所以这个问题先放一下?

@abc1763613206

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 10, 2019

const fs = require("fs")
const lines = fs.readFileSync("FILENAME.TXT").toString().split("\n") 
if (lines.includes("disqus:")) { // Do something. } 

找到个差不多的方案?
然后给meta判断分隔符

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.