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

请问/页面默认的title怎么改掉(Fu),其它页面的没有问题 #1

Closed
biluohc opened this issue May 17, 2017 · 3 comments
Closed

Comments

@biluohc
Copy link

biluohc commented May 17, 2017

base.tpl:
主题里所有能看到的Fu都已经改了,或者在rust源码里面?
或者应该把它(网站名)放到config.toml?
另外还有favicon.ico和logo.png的路径。

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <link rel="icon" href="/media/static/img/favicon.ico">
  <link rel="stylesheet" href="/static/css/main.css">
  {% block css %}{% endblock css %}
  <title>{{ title }}</title>
</head>
<body>

生成的html

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <link rel="icon" href="/media/static/img/favicon.ico">
  <link rel="stylesheet" href="/static/css/main.css">
  
  <title>Fu</title>
</head>
<body>
@FuGangqiang
Copy link
Owner

所有的页面元素都是通过 theme 中的 template 控制的,
现在都是写死的,如果需要修改需要直接修改 _themes/simple/templates/*.tpl 这些文件里的对应项

我准备把那些可变的放到 config.toml 里面,不过现在能用,就懒得改了,
准备以后有空把这个功能加上

@biluohc
Copy link
Author

biluohc commented May 17, 2017

我说了主题里所有我看到的Fu都改了,但是/页面的title还是Fu,就base.tpl里有三个,所以我怀疑是不是在rust源码里...

@FuGangqiang
Copy link
Owner

FuGangqiang commented May 17, 2017

恩,是的,首页的标题在代码里面:

let mut context = self.base_context("Fu");

@FuGangqiang FuGangqiang added this to the v0.2 milestone May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants