If I have a page with:
@section SomeStuff { This is a section I just addered } >
@section SomeStuff { This is a section I just addered }
You can set a section to be optional by setting the required parameter to false. If you'd like to include some optional wrapper HTML around your section then you can also use the IsSectionDefined method.
@if(IsSectionDefined("SideBar")) { @RenderSection("SideBar", required: false) }