Skip to content

Commit

Permalink
add edit this page link (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
brad authored Jan 28, 2024
1 parent 83abbcd commit c65e1d5
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ highlighter: rouge
permalink: /:categories/:title/
lsi: false
markdown: KramdownPlus
repo: https://github.com/nsubstitute/NSubstitute

kramdown:
input: GFM
Expand Down
4 changes: 2 additions & 2 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1 class="copy-disabled" style="display: inline"> NSubstitute </h1> <br />
<div id="nav">
<a href="/help/getting-started">Get started</a> |
<a href="/help.html">Docs and getting help</a> |
<a href="https://github.com/nsubstitute/NSubstitute">NSub on GitHub</a>
<a href="{{ site.repo }}">NSub on GitHub</a>
</div>

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

<div id="footer">
NSubstitute is open source software, licensed under the <a href="https://www.opensource.org/licenses/bsd-license.php">BSD License</a>.<br />
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 />
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 />
NSubstitute logo donated by <a href="https://troyhunt.com">Troy Hunt</a>.
</div>

Expand Down
4 changes: 4 additions & 0 deletions docs/_layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
<div id="post-content">
<h1>{{ page.title }}</h1>
{{ content }}
<a class="edit-link" href="{{ site.repo }}/tree/main/docs/{{ page.path }}">
<div class="pencil"></div>
<span class="edit-text">Edit this page</span>
</a>
<div id="page-navigation">
<div class="previous">
{% if page.previous.url %}
Expand Down
36 changes: 36 additions & 0 deletions docs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,42 @@ h3 {
cursor: pointer;
}

.edit-link {
display: inline-block;
margin-top: 10px;
}
.edit-text {
padding-left: 18px;
}
.pencil {
width: 5px;
height: 12px;
background: #365f91;
margin-right: 12px;
position: relative;
left: 2px;
top: 15px;
transform: rotate(30deg);
}
.pencil::before {
content: "";
position: absolute;
width: 5px;
height: 5px;
background: #365f91;
top: -6px ;
}
.pencil::after {
content: "" ;
position: absolute;
width: 3.5px;
height: 3.5px;
background: #365f91;
left: 0.75px;
bottom: -2px;
transform: rotate(45deg);
}

/* Pygments vs style, as generated by:
* https://github.com/richleland/pygments-css/blob/master/vs.css
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

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

<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>
<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>
2 changes: 1 addition & 1 deletion docs/help/_posts/2013-04-01-threading.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ layout: post

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.

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.
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.

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 comments on commit c65e1d5

Please sign in to comment.