-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2034 from jceb/fluture
Add fluture documentation (14.0.0)
- Loading branch information
Showing
8 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
._fluture { | ||
@extend %simple; | ||
|
||
pre > code { | ||
font-size: inherit; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Docs | ||
class Fluture | ||
class CleanHtmlFilter < Filter | ||
def call | ||
# Replace header image with text | ||
at_css('h1').content = 'Fluture' | ||
|
||
# Remove the build line | ||
css('h1 ~ p:first-of-type').remove | ||
|
||
# Remove the fantasy land image link | ||
css('p a').remove | ||
|
||
# Make headers bigger by transforming them into a bigger variant | ||
css('h3').each { |node| node.name = 'h2' } | ||
css('h4').each { |node| node.name = 'h3' } | ||
|
||
doc | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Docs | ||
class Fluture | ||
class EntriesFilter < Docs::EntriesFilter | ||
# The entire reference is one big page, so get_name and get_type are not necessary | ||
def additional_entries | ||
entries = [] | ||
type = "" | ||
|
||
css("h3, h4").each do |node| | ||
case node.name | ||
when "h3" | ||
type = node.text | ||
when "h4" | ||
name = node.text | ||
id = node.text.downcase | ||
entries << [name, id, type] | ||
end | ||
end | ||
|
||
entries | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module Docs | ||
|
||
class Fluture < Github | ||
self.name = "Fluture" | ||
self.slug = "fluture" | ||
self.type = "fluture" | ||
self.release = "14.0.0" | ||
self.base_url = "https://github.com/fluture-js/Fluture/blob/#{self.release}/README.md" | ||
self.links = { | ||
home: "https://github.com/fluture-js/Fluture", | ||
code: "https://github.com/fluture-js/Fluture", | ||
} | ||
|
||
html_filters.push "fluture/entries", "fluture/clean_html" | ||
|
||
options[:skip] = %w[middleware.gif] | ||
options[:container] = '.markdown-body' | ||
options[:title] = "Fluture" | ||
options[:trailing_slash] = false | ||
options[:attribution] = <<-HTML | ||
© 2020 Aldwin Vlasblom<br> | ||
Licensed under the MIT License. | ||
HTML | ||
|
||
def get_latest_version(opts) | ||
get_npm_version("fluture", opts) | ||
end | ||
end | ||
end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://github.com/fluture-js/Fluture/ |