Commit 26311f10 authored by Clint.Network's avatar Clint.Network

Adding MkDocs

parent 9b7ec9a4
...@@ -9,7 +9,6 @@ using Newtonsoft.Json; ...@@ -9,7 +9,6 @@ using Newtonsoft.Json;
using RestSharp; using RestSharp;
using Stratis.Guru.Models; using Stratis.Guru.Models;
using Stratis.Guru.Settings; using Stratis.Guru.Settings;
using RestClient = NBitcoin.RPC.RestClient;
namespace Stratis.Guru.Controllers namespace Stratis.Guru.Controllers
{ {
...@@ -66,7 +65,7 @@ namespace Stratis.Guru.Controllers ...@@ -66,7 +65,7 @@ namespace Stratis.Guru.Controllers
[Route("address/{address}")] [Route("address/{address}")]
public ActionResult<object> Address(string address) public ActionResult<object> Address(string address)
{ {
var endpointClient = new RestSharp.RestClient($"{_nakoApiSettings.Endpoint}query/address/{address}/transactions"); var endpointClient = new RestClient($"{_nakoApiSettings.Endpoint}query/address/{address}/transactions");
var enpointRequest = new RestRequest(Method.GET); var enpointRequest = new RestRequest(Method.GET);
var endpointResponse = endpointClient.Execute(enpointRequest); var endpointResponse = endpointClient.Execute(enpointRequest);
return JsonConvert.DeserializeObject(endpointResponse.Content); return JsonConvert.DeserializeObject(endpointResponse.Content);
...@@ -76,7 +75,7 @@ namespace Stratis.Guru.Controllers ...@@ -76,7 +75,7 @@ namespace Stratis.Guru.Controllers
[Route("transaction/{transaction}")] [Route("transaction/{transaction}")]
public ActionResult<object> Transaction(string transaction) public ActionResult<object> Transaction(string transaction)
{ {
var endpointClient = new RestSharp.RestClient($"{_nakoApiSettings.Endpoint}query/transaction/{transaction}"); var endpointClient = new RestClient($"{_nakoApiSettings.Endpoint}query/transaction/{transaction}");
var enpointRequest = new RestRequest(Method.GET); var enpointRequest = new RestRequest(Method.GET);
var endpointResponse = endpointClient.Execute(enpointRequest); var endpointResponse = endpointClient.Execute(enpointRequest);
return JsonConvert.DeserializeObject(endpointResponse.Content); return JsonConvert.DeserializeObject(endpointResponse.Content);
...@@ -86,7 +85,7 @@ namespace Stratis.Guru.Controllers ...@@ -86,7 +85,7 @@ namespace Stratis.Guru.Controllers
[Route("block/{block}")] [Route("block/{block}")]
public ActionResult<object> Block(string block) public ActionResult<object> Block(string block)
{ {
var endpointClient = new RestSharp.RestClient($"{_nakoApiSettings.Endpoint}query/block/index/{block}/transactions"); var endpointClient = new RestClient($"{_nakoApiSettings.Endpoint}query/block/index/{block}/transactions");
var enpointRequest = new RestRequest(Method.GET); var enpointRequest = new RestRequest(Method.GET);
var endpointResponse = endpointClient.Execute(enpointRequest); var endpointResponse = endpointClient.Execute(enpointRequest);
return JsonConvert.DeserializeObject(endpointResponse.Content); return JsonConvert.DeserializeObject(endpointResponse.Content);
......
# Welcome to MkDocs
For full documentation visit [mkdocs.org](https://mkdocs.org).
## Commands
* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs help` - Print this help message.
## Project layout
mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
site_name: Stratis.Guru Documentation
site_description: Strati.Guru API Documentation
site_author: Clint Mourlevat
repo_url: https://github.com/clintnetwork/stratis-guru-v2.git
google_analytics: ["UA-111742056-1", "stratis.guru"]
theme: readthedocs
...@@ -87,6 +87,15 @@ namespace Stratis.Guru ...@@ -87,6 +87,15 @@ namespace Stratis.Guru
RequestPath = "/npm" RequestPath = "/npm"
}); });
app.UseFileServer(new FileServerOptions
{
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "Documentation/site/")),
RequestPath = "/documentation",
EnableDirectoryBrowsing = false,
EnableDefaultFiles = true,
DefaultFilesOptions = { DefaultFileNames = {"index.html"}}
});
app.UseSignalR(routes => app.UseSignalR(routes =>
{ {
routes.MapHub<UpdateHub>("/update"); routes.MapHub<UpdateHub>("/update");
......
...@@ -14,4 +14,8 @@ ...@@ -14,4 +14,8 @@
<PackageReference Include="RestSharp" Version="106.5.4"/> <PackageReference Include="RestSharp" Version="106.5.4"/>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Documentation"/>
</ItemGroup>
</Project> </Project>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<li><a asp-action="Vanity" asp-controller="Home"><i class="fa fa-at"></i> VANITY</a></li> <li><a asp-action="Vanity" asp-controller="Home"><i class="fa fa-at"></i> VANITY</a></li>
<li><a asp-action="Generator" asp-controller="Home"><i class="fa fa-qrcode"></i> ADDRESS GENERATOR</a></li> <li><a asp-action="Generator" asp-controller="Home"><i class="fa fa-qrcode"></i> ADDRESS GENERATOR</a></li>
<li><a asp-action="API" asp-controller="Home"><i class="fa fa-book"></i> API</a></li> <li><a asp-action="API" asp-controller="Home"><i class="fa fa-book"></i> API</a></li>
<li><a asp-action="About" asp-controller="Home"><i class="fa fa-info-circle"></i> ABOUT STRATIS.GURU</a></li> <li><a asp-action="About" asp-controller="Home"><i class="fa fa-info-circle"></i> ABOUT</a></li>
@*<li><a asp-action="Contact" asp-controller="Home"><i class="fa fa-envelope"></i> CONTACT</a></li>*@ @*<li><a asp-action="Contact" asp-controller="Home"><i class="fa fa-envelope"></i> CONTACT</a></li>*@
</ul> </ul>
<a class='menu-trigger'> <a class='menu-trigger'>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</header> </header>
@RenderBody() @RenderBody()
<div id="crafted"> <div id="crafted">
<p class="text-center small">Proudly Crafted with 💖 by <a href="https://twitter.com/clint_network" target="_blank">Clint.Network</a> — Help me to maintain by sending some $STRAT at <a asp-controller="BlockExplorer" asp-action="Address" asp-route-address="SR2ZXnhRnMqJNoeDiCFUnaug7TKHJocwDd">SR2ZXnhRnMqJNoeDiCFUnaug7TKHJocwDd</a>.</p> <p class="text-center small">Proudly Crafted with 💖 by <a href="https://twitter.com/clint_network" target="_blank">Clint.Network</a> — Help me to maintain by sending some $STRAT at <a asp-controller="BlockExplorer" asp-action="Address" asp-route-address="SRCzydu7yjS2VGv2YuHZS83Nekx42PVPdy">SRCzydu7yjS2VGv2YuHZS83Nekx42PVPdy</a>.</p>
</div> </div>
<script src="~/js/jquery-2.1.0.min.js"></script> <script src="~/js/jquery-2.1.0.min.js"></script>
<script src="~/js/popper.js"></script> <script src="~/js/popper.js"></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment