Skip to content
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

[docs] add id to plugin headline so it becomes linkable #13727

Merged
merged 1 commit into from Nov 22, 2018

Conversation

janpio
Copy link
Member

@janpio janpio commented Nov 20, 2018

This adds an ID to the plugin headline so it becomes linkable via an anchor #pluginname.

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this addition! Just one small question

@@ -2,7 +2,7 @@

<div class="quality-index" style="color: #<%= @plugin.color_to_use %>"><%= @plugin.data[:overall_score] %></div>

<h3><a href="<%= @plugin.homepage %>" target="_blank"><code><%= @plugin.name.gsub("fastlane-plugin-", "") %></code></a></h3>
<h3 id="<%= @plugin.name.gsub("fastlane-plugin-", "") %>"><a href="<%= @plugin.homepage %>" target="_blank"><code><%= @plugin.name.gsub("fastlane-plugin-", "") %></code></a></h3>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it preferred to make this a name attribute on the anchor? This way it will update the navigation bar to have the named anchor in the url when clicked? 🤔

Suggested change
<h3 id="<%= @plugin.name.gsub("fastlane-plugin-", "") %>"><a href="<%= @plugin.homepage %>" target="_blank"><code><%= @plugin.name.gsub("fastlane-plugin-", "") %></code></a></h3>
<h3><a name="<%= @plugin.name.gsub("fastlane-plugin-", "") %>" href="<%= @plugin.homepage %>" target="_blank"><code><%= @plugin.name.gsub("fastlane-plugin-", "") %></code></a></h3>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it do that? I think this only happens if it is an empty anchor with href="#" or similar, not for an actual link that open a site.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhhhhhh, good point! Your implementation is 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, for normal headlines we get his "header anchor" that appears left to the actual headline. This is the code for it:
image
But I couldn't find out where this comes from really - but it would be perfect to be able to hotlink to the individual plugins as well!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it's an extension to mkdocs:
https://github.com/fastlane/docs/search?q=headeranchor&unscoped_q=headeranchor

So why isn't this applied to the h3 headline of the plugins?

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good 👍

@janpio janpio merged commit 21e00ca into master Nov 22, 2018
@janpio janpio deleted the janpio-plugin_linkable branch November 22, 2018 11:40
@fastlane-bot
Copy link

Hey @janpio 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

mariannegru added a commit to mariannegru/fastlane that referenced this pull request Dec 3, 2018
…select

* upstream/master: (34 commits)
  Use HTTPs for Facebook frame URL (fastlane#13771)
  [spaceship] improve client (mainly: login) (fastlane#13736)
  [spaceship] Fix environment variable provided sessions (fastlane#13743)
  Allow for the host of the Appetize API to be configured (fastlane#13765)
  Improves parse error reporting for non-conventional setups (fastlane#13769)
  Use `crash!` instead of `user_error!` on configuration access mis-use (fastlane#13766)
  Rip out more dead analytics code (fastlane#13741)
  [spaceship] support --verbose for `fastlane spaceauth` (fastlane#13752)
  [fastlane_core] Fix project_paths() in project.rb to respect `container:` references (fastlane#13662)
  [precheck] Allow mentioning Google Drive (fastlane#13754)
  [crashlytics] fix generated command (generate_android_command) for Windows (fastlane#13597)
  [docs] add id to plugin headline so it becomes linkable (fastlane#13727)
  [match] add new option to recreate deleted profiles in dev portal (fastlane#12539)
  Update puts.rb (fastlane#13739)
  Improve Spaceship API documentation (fastlane#13724)
  Update gym docs (fastlane#13725)
  Testfairy upload timeout (fastlane#13674)
  [resign.sh] only create the archived-expanded-entitlements.xcent file if the version of Xcode < 9.3 (fastlane#13685)
  [spaceship] remove application and version from app submission params (fastlane#13695)
  Improve AdbHelper (fastlane#13692)
  ...

# Conflicts:
#	spaceship/lib/spaceship/two_step_or_factor_client.rb
@fastlane fastlane locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants