Skip to content

Commit 46d414b

Browse files
author
markzegarelli
authored
Merge pull request #1584 from segmentio/update-edit-links
DRAFT: test update to the year+ old sidebar links PR
2 parents 6a5ce74 + eea461b commit 46d414b

File tree

8 files changed

+41
-4
lines changed

8 files changed

+41
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ For more information about contributing, see Contributing.
3333
- [Style Guide](#)
3434
- [Developer Guide](#)
3535

36-
## License
36+
## License
37+

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permalink: /:categories/:title/
1010

1111
exclude: ['js', '_site', '*.sketch']
1212
# Build settings
13+
os_links: false
1314
markdown: kramdown
1415
highlighter: rouge
1516
defaults:

src/_includes/icons/symbols/edit.svg

Lines changed: 5 additions & 0 deletions
Loading

src/_includes/icons/symbols/plus.svg

Lines changed: 3 additions & 0 deletions
Loading

src/_includes/sidebar/edit-tools.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% if site.os_links %}
2+
<div>
3+
<a href="https://github.com/segmentio/segment-docs/edit/master/src/{{ page.path }}" class="button edit flex no-icon" target="_blank">
4+
<span class="button__icon">{% include icons/symbols/edit.svg %}</span>
5+
6+
<span class="button__text">Edit this page</span>
7+
</a>
8+
9+
<a href="https://github.com/segmentio/segment-docs/issues/new?body=File:%20[{{ page.path }}](https://segment.com/docs/)" class="button edit no-icon" target="_blank">
10+
<span class="button__icon">{% include icons/symbols/plus.svg %}</span>
11+
12+
<span class="button__text">Request docs change</span>
13+
</a>
14+
</div>
15+
{% endif %}

src/_layouts/integration.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ <h1 id="{{ page.title | slugify }}">
9090

9191
<div class="docs__sidebar page__sidebar">
9292
<div class="sidebar sidebar--sticky sidebar--scroll">
93+
{% unless page.no-edit %}
94+
{% include sidebar/edit-tools.html %}
95+
{% endunless %}
9396
{%- unless page.hide_toc -%}
9497
{% if page.integration_type == 'destination' %}
9598
{% if page.hide-boilerplate == true %}

src/_layouts/page.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ <h1 id="{{ page.title | slugify }}">
6767
{%- unless page.hide-sidebar -%}
6868
<div class="docs__sidebar page__sidebar">
6969
<div class="sidebar sidebar--sticky sidebar--scroll">
70+
{% unless page.no-edit %}
71+
{% include sidebar/edit-tools.html %}
72+
{% endunless %}
7073
{%- unless page.hide_toc -%}
7174
<div data-anchors-indicator data-sections="h2" data-active-class="menu-side__link--active">
7275
{% include_cached sidebar/menu-side.html class="menu-side" anchor_class="menu-side__link" html=content h_min=2 h_max=2 %}

src/_sass/components/_button.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
border-radius: 4px;
1010
cursor: pointer;
1111

12-
@include breakpoint(medium up) {
12+
@include breakpoint(medium up) {
1313
padding: 8px 16px;
1414
}
1515

@@ -23,8 +23,8 @@
2323

2424
&__icon {
2525
vertical-align: middle;
26-
27-
& > svg {
26+
27+
&>svg {
2828
max-width: 12px;
2929
max-height: 12px;
3030
}
@@ -34,3 +34,9 @@
3434
width: 100%;
3535
}
3636
}
37+
38+
.edit {
39+
padding: 8px 0px;
40+
text-align: left;
41+
color: #8f95b2;
42+
}

0 commit comments

Comments
 (0)