Skip to content

Commit c65e1d5

Browse files
authored
add edit this page link (#769)
1 parent 83abbcd commit c65e1d5

File tree

6 files changed

+45
-4
lines changed

6 files changed

+45
-4
lines changed

docs/_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ highlighter: rouge
22
permalink: /:categories/:title/
33
lsi: false
44
markdown: KramdownPlus
5+
repo: https://github.com/nsubstitute/NSubstitute
56

67
kramdown:
78
input: GFM

docs/_layouts/default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h1 class="copy-disabled" style="display: inline"> NSubstitute </h1> <br />
1717
<div id="nav">
1818
<a href="/help/getting-started">Get started</a> |
1919
<a href="/help.html">Docs and getting help</a> |
20-
<a href="https://github.com/nsubstitute/NSubstitute">NSub on GitHub</a>
20+
<a href="{{ site.repo }}">NSub on GitHub</a>
2121
</div>
2222

2323
<div id="content">
@@ -26,7 +26,7 @@ <h1 class="copy-disabled" style="display: inline"> NSubstitute </h1> <br />
2626

2727
<div id="footer">
2828
NSubstitute is open source software, licensed under the <a href="https://www.opensource.org/licenses/bsd-license.php">BSD License</a>.<br />
29-
The NSubstitute project is possible <a href="https://github.com/nsubstitute/NSubstitute/blob/master/acknowledgements.md">thanks to a number of other software projects</a>. We acknowledge their awesomeness.<br />
29+
The NSubstitute project is possible <a href="{{ site.repo }}/blob/master/acknowledgements.md">thanks to a number of other software projects</a>. We acknowledge their awesomeness.<br />
3030
NSubstitute logo donated by <a href="https://troyhunt.com">Troy Hunt</a>.
3131
</div>
3232

docs/_layouts/post.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
<div id="post-content">
1515
<h1>{{ page.title }}</h1>
1616
{{ content }}
17+
<a class="edit-link" href="{{ site.repo }}/tree/main/docs/{{ page.path }}">
18+
<div class="pencil"></div>
19+
<span class="edit-text">Edit this page</span>
20+
</a>
1721
<div id="page-navigation">
1822
<div class="previous">
1923
{% if page.previous.url %}

docs/css/style.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,42 @@ h3 {
219219
cursor: pointer;
220220
}
221221

222+
.edit-link {
223+
display: inline-block;
224+
margin-top: 10px;
225+
}
226+
.edit-text {
227+
padding-left: 18px;
228+
}
229+
.pencil {
230+
width: 5px;
231+
height: 12px;
232+
background: #365f91;
233+
margin-right: 12px;
234+
position: relative;
235+
left: 2px;
236+
top: 15px;
237+
transform: rotate(30deg);
238+
}
239+
.pencil::before {
240+
content: "";
241+
position: absolute;
242+
width: 5px;
243+
height: 5px;
244+
background: #365f91;
245+
top: -6px ;
246+
}
247+
.pencil::after {
248+
content: "" ;
249+
position: absolute;
250+
width: 3.5px;
251+
height: 3.5px;
252+
background: #365f91;
253+
left: 0.75px;
254+
bottom: -2px;
255+
transform: rotate(45deg);
256+
}
257+
222258
/* Pygments vs style, as generated by:
223259
* https://github.com/richleland/pygments-css/blob/master/vs.css
224260
*/

docs/help.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
<p>For more in depth information start with <a href="/help/creating-a-substitute">Creating a substitute</a>.</p>
1010

11-
<p>If you can't find the answer you're looking for, or if you have feature requests or feedback on NSubstitute, please <a href="https://github.com/nsubstitute/NSubstitute/issues">raise an issue</a> on our project site. All questions are welcome via our project site, but for "how-to"-style questions you can also try <a href="https://stackoverflow.com/tags/nsubstitute">StackOverflow with the [nsubstitute] tag</a>, which often leads to very good answers from the larger programming community. StackOverflow is especially useful if your question also relates to other libraries that our team may not be as familiar with (e.g. NSubstitute with Entity Framework). You can also head on over to the <a href="https://groups.google.com/group/nsubstitute">NSubstitute discussion group</a> if you prefer.</p>
11+
<p>If you can't find the answer you're looking for, or if you have feature requests or feedback on NSubstitute, please <a href="{{ site.repo }}/issues">raise an issue</a> on our project site. All questions are welcome via our project site, but for "how-to"-style questions you can also try <a href="https://stackoverflow.com/tags/nsubstitute">StackOverflow with the [nsubstitute] tag</a>, which often leads to very good answers from the larger programming community. StackOverflow is especially useful if your question also relates to other libraries that our team may not be as familiar with (e.g. NSubstitute with Entity Framework). You can also head on over to the <a href="https://groups.google.com/group/nsubstitute">NSubstitute discussion group</a> if you prefer.</p>

docs/help/_posts/2013-04-01-threading.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ layout: post
55

66
It is fairly standard for production code to call a substitute from multiple threads, but we should avoid having our test code configure or assert on a substitute while it is also be used from other threads in production code.
77

8-
Although this particular issue has been mitigated by work in [#452](https://github.com/nsubstitute/NSubstitute/pull/462), issue [#256](https://github.com/nsubstitute/NSubstitute/issues/256) shows the types of problems that can occur if we're not careful with threading.
8+
Although this particular issue has been mitigated by work in [#452]({{ site.repo }}/pull/462), issue [#256]({{ site.repo }}/issues/256) shows the types of problems that can occur if we're not careful with threading.
99

1010
To avoid this sort of problem, make sure your test has finished configuring its substitutes before exercising the production code, then make sure the production code has completed before your test asserts on `Received()` calls.

0 commit comments

Comments
 (0)