File tree Expand file tree Collapse file tree 6 files changed +14
-8
lines changed
Expand file tree Collapse file tree 6 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1010require "utopia/localization"
1111
1212require_relative "project/base"
13+ require_relative "project/import_map"
1314
1415module Utopia
1516 module Project
Original file line number Diff line number Diff line change 1+ require "utopia/import_map"
2+
3+ module Utopia
4+ module Project
5+ IMPORT_MAP = Utopia ::ImportMap . build ( base : "/_components/" ) do |map |
6+ map . import ( "mermaid" , "./mermaid/mermaid.esm.min.mjs" )
7+ end
8+ end
9+ end
Original file line number Diff line number Diff line change 1414
1515 <link rel="icon" type="image/png" href="/_static/icon.png" />
1616 <link rel="stylesheet" href="/_static/site.css" type="text/css" media="screen" />
17-
18- <script type="importmap" src="/_components/map.json"></script>
17+
18+ #{controller[:import_map].relative_to(request.path + "/").to_html}
1919
2020 <script src="/_components/jquery/jquery.min.js"></script>
2121 <script src="/_components/jquery-syntax/jquery.syntax.min.js"></script>
Original file line number Diff line number Diff line change 77
88on "**" do
99 @base = Utopia ::Project ::Base . instance
10+ @import_map = Utopia ::Project ::IMPORT_MAP
1011end
1112
1213on "index" do
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
3030 spec . add_dependency "markly" , "~> 0.7"
3131 spec . add_dependency "rackula" , "~> 1.3"
3232 spec . add_dependency "thread-local"
33- spec . add_dependency "utopia" , "~> 2.24 "
33+ spec . add_dependency "utopia" , "~> 2.31 "
3434end
You can’t perform that action at this time.
0 commit comments