adding in index.md support

This commit is contained in:
LarsBrubaker 2021-04-25 20:59:45 -07:00
parent 387108496d
commit 0467dbb22c
2 changed files with 12 additions and 2 deletions

View file

@ -830,6 +830,8 @@ namespace MatterHackers.MatterControl
this.Library.LibraryCollectionContainer = new LibraryCollectionContainer();
// this.Library.LibraryCollectionContainer.HeaderMarkdown = "Here you can find the collection of libraries you can use".Localize();
this.Library.RegisterContainer(
new DynamicContainerLink(
() => "Library".Localize(),

View file

@ -101,7 +101,6 @@ namespace MatterHackers.MatterControl.Library
OnContentChanged();
return;
}
HeaderMarkdown = "Some good markdown in the markdown header part";
ParseJson(content);
}
},
@ -146,8 +145,17 @@ namespace MatterHackers.MatterControl.Library
Repository,
file.download_url));
}
else if (file.name.ToLower() == "index.md")
else if (file.name == "index.md")
{
var uri = $"https://raw.githubusercontent.com/{Account}/{Repository}/main/{RepoDirectory}/index.md";
WebCache.RetrieveText(uri,
(content) =>
{
HeaderMarkdown = content;
OnContentChanged();
},
true,
AddCromeHeaders);
}
else
{