-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 docs site shell #2739
Add docs site shell #2739
Conversation
) | ||
end | ||
end | ||
end |
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.
Layout/TrailingBlankLines: Final newline missing.
docs_site/helpers/image_helpers.rb
Outdated
file = File.open(asset, 'r') { |f| f.read } | ||
# we pass svg-targeting css classes through here, ex. .svg-color--blue. The class targets fill, stroke, poly, circle, etc. | ||
css_class = options[:class] | ||
aspect_ratio = options[:preserveAspectRatio] |
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.
Lint/UselessAssignment: Useless assignment to variable - aspect_ratio.
docs_site/helpers/image_helpers.rb
Outdated
def inline_svg(filename, options = {}) | ||
asset = "source/assets/images/#{filename}" | ||
|
||
if File.exists?(asset) |
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.
Lint/DeprecatedClassMethods: File.exists? is deprecated in favor of File.exist?.
@@ -0,0 +1,51 @@ | |||
# Middleman - Inline SVG Helper |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
docs_site/helpers/custom_helpers.rb
Outdated
cls = "" | ||
end | ||
end | ||
return cls |
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.
Style/RedundantReturn: Redundant return detected.
docs_site/helpers/custom_helpers.rb
Outdated
def nav_inactive(paths) | ||
cls = "no-active" | ||
paths.each do |path| | ||
if(current_page.path.start_with? path) |
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.
Layout/SpaceAroundKeyword: Space after keyword if is missing.
docs_site/helpers/custom_helpers.rb
Outdated
@@ -0,0 +1,37 @@ | |||
module CustomHelpers | |||
def full_title(page_title=nil, site_title) |
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.
Style/OptionalArguments: Optional arguments should appear at the end of the argument list.
Layout/SpaceAroundEqualsInParameterDefault: Surrounding space missing in default value assignment.
@@ -0,0 +1,37 @@ | |||
module CustomHelpers |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
|
||
def discover_title(page = current_page) | ||
page_title = current_page.data.title || retrieve_page_header(page) | ||
category = page.path[/\/(.*?)\/.*\.html/, 1]&.gsub('-', ' ')&.capitalize |
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.
Lint/Syntax: unexpected token error
@@ -0,0 +1,8 @@ | |||
source "https://rubygems.org" |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
docs_site/helpers/custom_helpers.rb
Outdated
def nav_inactive(paths) | ||
cls = "no-active" | ||
paths.each do |path| | ||
if (current_page.path.start_with? path) |
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.
Style/ParenthesesAroundCondition: Don't use parentheses around the condition of an if.
docs_site/helpers/custom_helpers.rb
Outdated
# frozen_string_literal: true | ||
|
||
module CustomHelpers | ||
def full_title(site_title, page_title=nil) |
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.
Layout/SpaceAroundEqualsInParameterDefault: Surrounding space missing in default value assignment.
9049063
to
ee8ebcf
Compare
docs_site/source/topic.html.erb
Outdated
@@ -0,0 +1,111 @@ | |||
--- | |||
title: Home |
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.
is this file needed?
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.
@kennyadsl No, it's not. It was just a template/example of the styles we are using. I'll remove it!
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 didn't see all the files but at the moment I agree we shouldn't move guides files to another repository. Also, the guides preview looks great.
Thanks |
This PR contains the shell of a static site built to house the Solidus developers documentation.
A working version of the site can be viewed at: http://jgayfer.s3-website.us-east-1.amazonaws.com/
This site is modelled after the new Solidus marketing site to ensure a consistent user experience across both sites.
This site could also be used for future Solidus docs sites (API and Admin) to further the goal of a unified Solidus experience on the web.
Rationale
Keeping the source for the docs site within the Solidus repository has several advantages:
git clone
s of Solidus.We can decide to move the docs to another repository in the future. But first, we would need to create a plan to make sure the docs aren't treated as a second-class citizen.
Next steps
Note that this PR is a shell for the docs site:
docs_site/source/developers
directory..md
to.html.md
, as this is the format Middleman requires..md
to.html
.middleman-s3_sync
gem.