mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-09 12:41:12 -06:00
Temporarily remove list of flow charts from web version
This commit is contained in:
@@ -60,6 +60,7 @@ class ModifyBuild
|
|||||||
text = fix_list_of_tables_figures_duplicates(text)
|
text = fix_list_of_tables_figures_duplicates(text)
|
||||||
text = fix_menus_list_figures_tables(text) if is_list_figures_tables?(filename)
|
text = fix_menus_list_figures_tables(text) if is_list_figures_tables?(filename)
|
||||||
text = fix_list_of_figures_tables_display(text) if is_list_figures_tables?(filename)
|
text = fix_list_of_figures_tables_display(text) if is_list_figures_tables?(filename)
|
||||||
|
text = remove_link_to_flowcharts(text)
|
||||||
File.open(filename, "w") {|file| file.puts text }
|
File.open(filename, "w") {|file| file.puts text }
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -547,6 +548,17 @@ class ModifyBuild
|
|||||||
text.gsub("https:/cdn.jsdelivr.net", "https://cdn.jsdelivr.net")
|
text.gsub("https:/cdn.jsdelivr.net", "https://cdn.jsdelivr.net")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# The list of flowcharts contains no flowcharts in the HTML version. For
|
||||||
|
# this reason remove the link until we found a better solution
|
||||||
|
def remove_link_to_flowcharts(text)
|
||||||
|
doc = build_doc(text)
|
||||||
|
content = doc.css(".menu-items > .chapterToc").each do |el|
|
||||||
|
link = el.css("a")[0]
|
||||||
|
el.remove if link["href"] == "listflowchartname.html"
|
||||||
|
end
|
||||||
|
doc.to_html
|
||||||
|
end
|
||||||
|
|
||||||
def build_doc(text)
|
def build_doc(text)
|
||||||
Nokogiri::HTML(text)
|
Nokogiri::HTML(text)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user