mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-08 02:23:44 +00:00
add ogp tags for wiki page
This commit is contained in:
parent
523f23fc93
commit
1643ec122b
@ -1,5 +1,14 @@
|
|||||||
{% extends "base_for_react.html" %}
|
{% extends "base_for_react.html" %}
|
||||||
{% load render_bundle from webpack_loader %}
|
{% load render_bundle from webpack_loader %}
|
||||||
|
{% load seahub_tags %}
|
||||||
|
{% block extra_ogp_tags %}
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:site_name" content="{{ site_name }}">
|
||||||
|
<meta property="og:url" content="{{ service_url }}{{ request.path }}" />
|
||||||
|
<meta property="og:title" content="{{ repo_name }}" />
|
||||||
|
<meta property="og:image" content="{{ service_url }}{{ MEDIA_URL }}img/file/{{ filename|file_icon_filter }}" />
|
||||||
|
<meta property="og:description" content="{{ filename }}" />
|
||||||
|
{% endblock %}
|
||||||
{% block extra_style %}
|
{% block extra_style %}
|
||||||
{% render_bundle 'wiki' 'css' %}
|
{% render_bundle 'wiki' 'css' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -86,8 +86,11 @@ def slug(request, slug, file_path="home.md"):
|
|||||||
wiki.save()
|
wiki.save()
|
||||||
is_public_wiki = True
|
is_public_wiki = True
|
||||||
|
|
||||||
|
repo = seafile_api.get_repo(wiki.repo_id)
|
||||||
|
|
||||||
return render(request, "wiki/wiki.html", {
|
return render(request, "wiki/wiki.html", {
|
||||||
"wiki": wiki,
|
"wiki": wiki,
|
||||||
|
"repo_name": repo.name if repo else '',
|
||||||
"page_name": file_path,
|
"page_name": file_path,
|
||||||
"shared_token": fs.token,
|
"shared_token": fs.token,
|
||||||
"shared_type": fs.s_type,
|
"shared_type": fs.s_type,
|
||||||
|
Loading…
Reference in New Issue
Block a user