1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-28 03:10:45 +00:00

Merge pull request #4905 from haiwen/title

show filename as title when view published file
This commit is contained in:
Daniel Pan 2021-05-28 09:55:56 +08:00 committed by GitHub
commit 8f392f1cb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,8 @@
{% render_bundle 'wiki' 'css' %}
{% endblock %}
{% block sub_title %} {{filename|escapejs}} - {% endblock %}
{% block extra_script %}
<script type="text/javascript">
window.wiki = {

View File

@ -1,4 +1,5 @@
# Copyright (c) 2012-2016 Seafile Ltd.
import os
import logging
import urllib.request, urllib.error, urllib.parse
import posixpath
@ -92,6 +93,7 @@ def slug(request, slug, file_path="home.md"):
"shared_type": fs.s_type,
"user_can_write": user_can_write,
"file_path": file_path,
"filename": os.path.splitext(os.path.basename(file_path))[0],
"repo_id": wiki.repo_id,
"search_repo_id": wiki.repo_id,
"search_wiki": True,