diff --git a/docs/src/_components/syntax.erb b/docs/src/_components/syntax.erb deleted file mode 100644 index feeffd1f..00000000 --- a/docs/src/_components/syntax.erb +++ /dev/null @@ -1,22 +0,0 @@ -
-
-
- <%= filename_or_language %> -
- - - - - - - - -
- <%= markdownify("```#{language}" + content + "```") %> -
- diff --git a/docs/src/_components/syntax.rb b/docs/src/_components/syntax.rb deleted file mode 100644 index 80be2407..00000000 --- a/docs/src/_components/syntax.rb +++ /dev/null @@ -1,30 +0,0 @@ -require "securerandom" - -class Syntax < Bridgetown::Component - def self.full_language(language) - return "" if language.nil? - - Rouge::Lexer.find(language).title || language.titleize - end - - attr_accessor :language, :filename - - def initialize(language = "markup", filename = nil) - super() - @language = language - @filename = filename - end - - def filename_or_language - filename || full_language - end - - def full_language - Syntax.full_language(@language) - end - - def id - @id ||= "syntax-#{SecureRandom.uuid}" - end -end - diff --git a/docs/src/_documentation/how_tos/01-customizing-the-toolbar.md b/docs/src/_documentation/how_tos/01-customizing-the-toolbar.md index c913fb33..da091ede 100644 --- a/docs/src/_documentation/how_tos/01-customizing-the-toolbar.md +++ b/docs/src/_documentation/how_tos/01-customizing-the-toolbar.md @@ -8,7 +8,7 @@ takes the approach of slotting in HTML. Heres an example of "slotting" in an embed button. -<%= render Syntax.new("html") do %> +```html