mirror of https://github.com/freeCodeCamp/devdocs
parent
77d7e2ea77
commit
f18ffa7994
@ -0,0 +1,7 @@
|
|||||||
|
._nuxtjs {
|
||||||
|
> h2 { @extend %block-heading; }
|
||||||
|
> h3 { @extend %block-label, %label-blue; }
|
||||||
|
|
||||||
|
.alert { @extend %note; }
|
||||||
|
code, .filename { @extend %label; }
|
||||||
|
}
|
@ -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
|
@ -0,0 +1,9 @@
|
|||||||
|
module Docs
|
||||||
|
class Nuxtjs
|
||||||
|
class ContainerFilter < Filter
|
||||||
|
def call
|
||||||
|
at_css '.docus-content'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -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
|
@ -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
|
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1 @@
|
|||||||
|
https://nuxtjs.org/_nuxt/icons/icon_64x64.a3b4ce.png
|
Loading…
Reference in new issue