diff --git a/robots.txt b/robots.txt
index 7673d8daf5..6fd5a80692 100644
--- a/robots.txt
+++ b/robots.txt
@@ -12,12 +12,10 @@ Sitemap: https://zestedesavoir.com/sitemap-tutos.xml
User-agent: *
Disallow: /api/
Disallow: /articles/epub/
-Disallow: /articles/html/
Disallow: /articles/md/
Disallow: /articles/tex/
Disallow: /articles/zip/
Disallow: /billets/epub/
-Disallow: /billets/html/
Disallow: /billets/md/
Disallow: /billets/tex/
Disallow: /billets/zip/
@@ -27,7 +25,6 @@ Disallow: /oldarticles/
Disallow: /oldtutoriels/
Disallow: /rechercher/
Disallow: /tutoriels/epub/
-Disallow: /tutoriels/html/
Disallow: /tutoriels/md/
Disallow: /tutoriels/tex/
Disallow: /tutoriels/zip/
diff --git a/templates/tutorialv2/includes/list_of_exports.html b/templates/tutorialv2/includes/list_of_exports.html
index 8afdd498f4..1cf63de476 100644
--- a/templates/tutorialv2/includes/list_of_exports.html
+++ b/templates/tutorialv2/includes/list_of_exports.html
@@ -16,18 +16,6 @@
{% trans "Télécharger" %}
{% endif %}
{% endif %}
- {% if public_object.has_html %}
-
-
- {% trans "HTML" %}
- {% with size=public_object.get_size_html %}
- {% if size %}
- ({{ size|filesizeformat }})
- {% endif %}
- {% endwith %}
-
-
- {% endif %}
{% if public_object.has_pdf %}
diff --git a/zds/tutorialv2/models/database.py b/zds/tutorialv2/models/database.py
index 22c7565a3e..3579cd81e7 100644
--- a/zds/tutorialv2/models/database.py
+++ b/zds/tutorialv2/models/database.py
@@ -44,7 +44,7 @@
from zds.utils.templatetags.emarkdown import render_markdown_stats
from zds.utils.uuslug_wrapper import uuslug
-ALLOWED_TYPES = ["pdf", "md", "html", "epub", "zip", "tex"]
+ALLOWED_TYPES = ["pdf", "md", "epub", "zip", "tex"]
logger = logging.getLogger(__name__)
@@ -790,14 +790,6 @@ def has_md(self):
"""
return self.has_type("md")
- def has_html(self):
- """Check if the html version of the content is available
-
- :return: ``True`` if available, ``False`` otherwise
- :rtype: bool
- """
- return self.has_type("html")
-
def has_pdf(self):
"""Check if the pdf version of the content is available
diff --git a/zds/tutorialv2/publication_utils.py b/zds/tutorialv2/publication_utils.py
index d0288a2988..3f9eaff042 100644
--- a/zds/tutorialv2/publication_utils.py
+++ b/zds/tutorialv2/publication_utils.py
@@ -22,7 +22,7 @@
from zds.tutorialv2.signals import content_unpublished
from zds.tutorialv2.utils import export_content
from zds.forum.utils import send_post, lock_topic
-from zds.utils.templatetags.emarkdown import render_markdown, MD_PARSING_ERROR
+from zds.utils.templatetags.emarkdown import render_markdown
from zds.utils.templatetags.smileys_def import SMILEYS_BASE_PATH, LICENSES_BASE_PATH
logger = logging.getLogger(__name__)
@@ -331,29 +331,6 @@ def publish(self, md_file_path, base_name, **kwargs):
raise FailureDuringPublication("Zip could not be created", e)
-class ZmarkdownHtmlPublicator(Publicator):
- def publish(self, md_file_path, base_name, **kwargs):
- md_flat_content = _read_flat_markdown(md_file_path)
- published_content_entity = self.get_published_content_entity(md_file_path)
- html_flat_content, *_ = render_markdown(md_flat_content, disable_ping=True, disable_js=True)
- html_file_path = path.splitext(md_file_path)[0] + ".html"
- if str(MD_PARSING_ERROR) in html_flat_content:
- logging.getLogger(self.__class__.__name__).error("HTML could not be rendered")
- return
-
- with open(html_file_path, mode="w", encoding="utf-8") as final_file:
- final_file.write(html_flat_content)
- shutil.move(
- html_file_path,
- str(
- Path(
- published_content_entity.get_extra_contents_directory(),
- published_content_entity.content_public_slug + ".html",
- )
- ),
- )
-
-
@PublicatorRegistry.register("pdf")
class ZMarkdownRebberLatexPublicator(Publicator):
"""
diff --git a/zds/tutorialv2/urls/urls_articles.py b/zds/tutorialv2/urls/urls_articles.py
index 33760d9aa3..a43442a0aa 100644
--- a/zds/tutorialv2/urls/urls_articles.py
+++ b/zds/tutorialv2/urls/urls_articles.py
@@ -15,18 +15,9 @@
path("//", DisplayOnlineArticle.as_view(), name="view"),
# Downloads
path("md//.md", DownloadOnlineArticle.as_view(requested_file="md"), name="download-md"),
- path(
- "html//.html",
- DownloadOnlineArticle.as_view(requested_file="html"),
- name="download-html",
- ),
path("pdf//.pdf", DownloadOnlineArticle.as_view(requested_file="pdf"), name="download-pdf"),
path("tex//.tex", DownloadOnlineArticle.as_view(requested_file="tex"), name="download-tex"),
- path(
- "epub//.epub",
- DownloadOnlineArticle.as_view(requested_file="epub"),
- name="download-epub",
- ),
+ path("epub//.epub", DownloadOnlineArticle.as_view(requested_file="epub"), name="download-epub"),
path("zip//.zip", DownloadOnlineArticle.as_view(requested_file="zip"), name="download-zip"),
# Listing
path("", RedirectView.as_view(pattern_name="publication:list", permanent=True)),
diff --git a/zds/tutorialv2/urls/urls_opinions.py b/zds/tutorialv2/urls/urls_opinions.py
index c6a53e0ee1..445c618999 100644
--- a/zds/tutorialv2/urls/urls_opinions.py
+++ b/zds/tutorialv2/urls/urls_opinions.py
@@ -1,4 +1,4 @@
-from django.urls import path, path
+from django.urls import path
from zds.tutorialv2.feeds import LastOpinionsFeedRSS, LastOpinionsFeedATOM
from zds.tutorialv2.views.lists import ListOpinions, ContentOfAuthor
@@ -13,17 +13,8 @@
path("//", DisplayOnlineOpinion.as_view(), name="view"),
# downloads:
path("md//.md", DownloadOnlineOpinion.as_view(requested_file="md"), name="download-md"),
- path(
- "html//.html",
- DownloadOnlineOpinion.as_view(requested_file="html"),
- name="download-html",
- ),
path("pdf//.pdf", DownloadOnlineOpinion.as_view(requested_file="pdf"), name="download-pdf"),
- path(
- "epub//.epub",
- DownloadOnlineOpinion.as_view(requested_file="epub"),
- name="download-epub",
- ),
+ path("epub//.epub", DownloadOnlineOpinion.as_view(requested_file="epub"), name="download-epub"),
path("zip//.zip", DownloadOnlineOpinion.as_view(requested_file="zip"), name="download-zip"),
path("tex//.tex", DownloadOnlineOpinion.as_view(requested_file="tex"), name="download-tex"),
# Listing
diff --git a/zds/tutorialv2/urls/urls_tutorials.py b/zds/tutorialv2/urls/urls_tutorials.py
index 790025d3fa..16d5918a3c 100644
--- a/zds/tutorialv2/urls/urls_tutorials.py
+++ b/zds/tutorialv2/urls/urls_tutorials.py
@@ -28,7 +28,6 @@
path("//", DisplayOnlineTutorial.as_view(), name="view"),
# downloads:
path("md//.md", DownloadOnlineTutorial.as_view(requested_file="md"), name="download-md"),
- path("html//.html", DownloadOnlineTutorial.as_view(requested_file="html"), name="download-html"),
path("pdf//.pdf", DownloadOnlineTutorial.as_view(requested_file="pdf"), name="download-pdf"),
path("epub//.epub", DownloadOnlineTutorial.as_view(requested_file="epub"), name="download-epub"),
path("zip//.zip", DownloadOnlineTutorial.as_view(requested_file="zip"), name="download-zip"),