Update Sass documentation (1.55.0)

Obtain version from https://www.npmjs.com/package/sass as indicated in
https://sass-lang.com/install.
This commit is contained in:
Simon Legner 2022-10-23 23:28:41 +02:00
parent c1c546e72b
commit 3b2daf1e6d
4 changed files with 14 additions and 8 deletions

View file

@ -833,9 +833,9 @@ credits = [
'https://raw.githubusercontent.com/sanctuary-js/sanctuary/master/LICENSE'
], [
'Sass',
'2006-2020 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein',
'2022 Google Inc.',
'MIT',
'https://raw.githubusercontent.com/sass/sass/stable/MIT-LICENSE'
'https://raw.githubusercontent.com/sass/sass/main/LICENSE'
], [
'Scala',
'2002-2022 EPFL, with contributions from Lightbend',

View file

@ -2,6 +2,7 @@ module Docs
class Sass
class CleanHtmlFilter < Filter
def call
@doc = at_css('#main-content')
css('.sl-c-alert').remove
@ -11,6 +12,8 @@ module Docs
css('.site-footer').remove
css('.tsd-breadcrumb').remove
# Add id to code blocks
css('pre.signature').each do |node|
@ -41,10 +44,12 @@ module Docs
### Syntax Highlight ###
css('.highlight.scss', '.highlight.sass').each do |node|
node['data-language'] = 'scss'
node.content = node.content.strip
end
css('.highlight.css').each do |node|
node['data-language'] = 'css'
node.content = node.content.strip
end
doc

View file

@ -3,7 +3,7 @@ module Docs
class EntriesFilter < Docs::EntriesFilter
def get_name
at_css('#main-content > h1').content
at_css('#main-content > h1, #main-content h1').content
end
def get_type
@ -23,6 +23,8 @@ module Docs
'Command line'
when /modules/
'Modules'
when /js-api/
'JavaScript API'
else
'Misc'
end

View file

@ -1,7 +1,7 @@
module Docs
class Sass < UrlScraper
self.type = 'yard'
self.release = '3.6.4'
self.release = '1.55.0'
self.base_url = 'https://sass-lang.com/documentation'
self.root_path = 'index.html'
self.links = {
@ -9,22 +9,21 @@ module Docs
code: 'https://github.com/sass/sass'
}
html_filters.push 'sass/clean_html', 'sass/entries', 'title'
html_filters.push 'sass/entries', 'sass/clean_html'
options[:root_title] = false
options[:title] = 'Sass Functions'
options[:skip_patterns] = [/breaking-changes/]
# options[:container] = '#main-content'
options[:attribution] = <<-HTML
&copy; 2006&ndash;2020 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein<br>
&copy; 2006&ndash;2022 the Sass team, and numerous contributors<br>
Licensed under the MIT License.
HTML
def get_latest_version(opts)
get_latest_github_release('sass', 'libsass', opts)
get_npm_version('sass', opts)
end
end