-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NuxtJS documentation (2.15.8) #1832
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
._nuxtjs { | ||
> h2 { @extend %block-heading; } | ||
> h3 { @extend %block-label, %label-blue; } | ||
|
||
.alert { @extend %note; } | ||
code, .filename { @extend %label; } | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module Docs | ||
class Nuxtjs | ||
class CleanHtmlFilter < Filter | ||
def call | ||
|
||
# Remove option selectors (e.g. Yarn / NPX / NPM) since we show each section | ||
css('.d-code-group-header-bg').remove | ||
|
||
# Remove a in headers | ||
css('h2 > a', 'h3 > a').each do |node| | ||
node.parent.content = node.content | ||
node.remove | ||
end | ||
|
||
doc | ||
end | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Docs | ||
class Nuxtjs | ||
class ContainerFilter < Filter | ||
def call | ||
at_css '.docus-content' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Simply use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe I tried that but it didn't end up following links and thus didn't do a full scrape. But I guess will have to tackle the license issue first 😅 |
||
end | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module Docs | ||
class Nuxtjs | ||
class EntriesFilter < Docs::EntriesFilter | ||
def get_name | ||
header = at_css('h1') | ||
if header | ||
header.content | ||
else | ||
path.split("/").last.titleize | ||
end | ||
end | ||
|
||
def get_type | ||
path.split("/").first.titleize | ||
end | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module Docs | ||
class Nuxtjs < UrlScraper | ||
self.name = 'NuxtJS' | ||
self.name = 'nuxtjs' | ||
self.type = 'nuxtjs' | ||
self.release = '2.15.8' | ||
self.base_url = 'https://nuxtjs.org/docs/' | ||
self.root_path = 'get-started/installation' | ||
|
||
self.links = { | ||
home: 'https://nuxtjs.org/', | ||
code: 'https://github.com/nuxt/nuxt.js' | ||
} | ||
|
||
html_filters.push 'nuxtjs/container', 'nuxtjs/entries', 'nuxtjs/clean_html' | ||
|
||
options[:only_patterns] = [ | ||
/\Aget-started\//, /\Aconcepts\//, /\Afeatures\//, | ||
/\Adirectory-structure\//, /\Aconfiguration-glossary\//, /\Ainternals-glossary\// | ||
] | ||
options[:trailing_slash] = false | ||
|
||
options[:attribution] = <<-HTML | ||
© This project is licensed under the terms of the MIT license. | ||
HTML | ||
|
||
def get_latest_version(opts) | ||
get_latest_github_release('nuxt', 'nuxt.js', opts) | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://nuxtjs.org/_nuxt/icons/icon_64x64.a3b4ce.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we display the license of the docs not the source code.
This one uses https://creativecommons.org/licenses/by-nd/4.0/ "Creative Commons Attribution-NoDerivatives 4.0" – is devdocs.io a derivative? Rather yes? https://creativecommons.org/faq/#what-is-an-adaptation
Here's how we dealt with it in the past #1752 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try reach out to them to get some clarification. But yeah seems this would be a blocker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made some updates to the mc-stan issue regarding the no derivatives clause of the CC license.