INTERFACE ISite
- Namespace: SuCoS.Models
- Source File: ISite.cs
The main configuration of the program, primarily extracted from the app.yaml file.
Properties
SuCoS
(Sucos) : SuCos internal variables
Options
(IGenerateOptions) { get; set }: Command line options
Theme
(Theme?) : Theme used.
SourceContentPath
(string) : The path of the content, based on the source path.
SourceStaticPath
(string) : The path of the static content (that will be copied as is), based on the source path.
SourceThemePath
(string) : The path theme.
OutputReferences
(ConcurrentDictionary<Uri, IOutput>) : List of all pages, including generated, by their permalink.
Pages
(IEnumerable
RegularPages
(IEnumerable
Home
(IPage?) : The page of the home page;
CacheManager
(SiteCacheManager) : Manage all caching lists for the site
Parser
(IFrontMatterParser) : Front Matter parser
TemplateEngine
(ITemplateEngine) : The template engine.
Logger
(ILogger) : The logger instance.
SourceFolders
(IEnumerable
Public Methods
ResetCache
public void ResetCache()
Resets the template cache to force a reload of all templates.
ScanAndParseSourceFiles
public void ScanAndParseSourceFiles(IFileSystem fs, string? directory = null, int level = 0, ContentSource? parent = null, FrontMatter? cascade = null)
Search recursively for all markdown files in the content folder, then parse their content for front matter and markdown.
Parameters:
fs(IFileSystem)directory(string?): Folder to scan (Default:null)level(int): Folder recursive level (Default:0)parent(ContentSource?): Page of the upper directory (Default:null)cascade(FrontMatter?) (Default:null)
ProcessPages
public void ProcessPages()
Expand the front matter to full-blown pages.
PostProcessPage
public void PostProcessPage(IPage page, bool overwrite = false)
Extra calculation and automatic data for each page.
Parameters:
page(IPage): The given page to be processedoverwrite(bool) (Default:false)
IsPageValid
public bool IsPageValid(IContentSource frontMatter, IGenerateOptions? options)
Check if the page have the conditions to be published: valid date and not draft, unless a command line option to force it.
Parameters:
frontMatter(IContentSource): Page or front matteroptions(IGenerateOptions?): options
Returns: bool
IsDateValid
public bool IsDateValid(IContentSource contentSource, IGenerateOptions? options)
Check if the page have a publishing date from the past.
Parameters:
contentSource(IContentSource): Page or content Sourceoptions(IGenerateOptions?): options
Returns: bool
IsDateExpired
public bool IsDateExpired(IContentSource contentSource)
Check if the page is expired
Parameters:
contentSource(IContentSource)
Returns: bool
IsDatePublishable
public bool IsDatePublishable(IContentSource contentSource)
Check if the page is publishable
Parameters:
contentSource(IContentSource)
Returns: bool
PageCreate
public List<Page> PageCreate(ContentSource contentSource)
Create a Page from front matter
Parameters:
contentSource(ContentSource)
Returns: List<Page>
ContentSourceAdd
ContentSource? ContentSourceAdd(ContentSource? contentSource)
Include the Front Matter into the site
Parameters:
contentSource(ContentSource?)
Returns: ContentSource?