• Subtext博客基本配置


           Subtext博客配置分两种,一种是存在数据库中的,可以修改,一种则是存在web.config文件中,暂时还没有实现可修改。

    看下图



    BlogConfigurationSettings类为blog默认设置,其中包括一些集合属性,如AllowedHtmlTags还有Tracking对象等,

    Config包含了BlogConfigurationSettings对象,作为站点配置,这里应该说明一下Subtext并非个人版博客,其也可以创建多博客,只是由于URL的原因,让你产生了幻觉:),你看Config就提供了CreateBlog方法,对于我们个人使用可能不太常用.但UpdateConfigData方法绝对很常用.他会更新BlogInfo对象大部分的属性,不管你需要不需要更新,如blog用户名和密码等.

    SkinConfig你可以不用去管他,它作为BlogInfo的子属性而存在,当刚创建blog的时候会给出一个默认的skin

    数据库可改的属性就不看了,我们来看下web.config里的配置

        <BlogConfigurationSettings type="Subtext.Framework.Configuration.BlogConfigurationSettings, Subtext.Framework">
            
    <Tracking enableAggBugs="true" enableWebStats="true" queueStats="true" queueStatsCount="5" enableTrackBacks="true" enablePingBacks="true" pingWeblogs="true"/>

            
    <!--    
                Checkout Subtext.Framework.Security 
    for hashing passwords.  
                This should be 
    set when first installing the application 
                and really shouldn
    't be changed afterwards.    
            -->
            
    <UseHashedPasswords>true</UseHashedPasswords>

            
    <!-- Globally control access to web services -->
            
    <AllowServiceAccess>true</AllowServiceAccess>

            
    <AllowImages>true</AllowImages>

            
    <!-- Globally control use of XHTML -->
            
    <UseXHTML>true</UseXHTML>

            
    <!-- Default Item Count -->
            
    <ItemCount>25</ItemCount>

            
    <!-- Default Number of Posts to Show on Category Pages. Use 0 to show all. -->
            
    <CategoryListPostCount>0</CategoryListPostCount>

            
    <!-- Default Server Time Zone Offset -->
            
    <ServerTimeZone>-8</ServerTimeZone>

            
    <!-- Whether or not to GZIP the RSS and/or atom feeds. -->
            
    <UseSyndicationCompression>true</UseSyndicationCompression>
        
    </BlogConfigurationSettings>

    另外还有AllowableCommentHtml用于过滤评论的html语言,其中集合中的是允许使用的标签

        <AllowableCommentHtml>
            
    <add key="a" value="href,title"/>
            
    <add key="b" value=""/>
            
    <add key="strong" value=""/>
            
    <add key="blockquote" value="cite"/>
            
    <add key="i" value=""/>
            
    <add key="em" value=""/>
            
    <add key="u" value=""/>
            
    <add key="strike" value=""/>
            
    <add key="super" value=""/>
            
    <add key="sub" value=""/>
            
    <add key="code" value=""/>
        
    </AllowableCommentHtml>

    结合代码和配置的话,应该马上就可以看明白.

    web.config文件的配置是相当多的,由于此系统主要是个人博客使用为多,所以配置多点也无所谓,一次性搞清楚就好.
    另外其他的还有appSetting节点下的一些配置,如UI Text,其由Subtext.Web.UI.UIText读取,这几个是直接显示在页面上的,你可以把它改成中文也可以.
     <!--UI Text -->
            
    <add key="PostCollection" value="Post Categories"/>
            
    <add key="ArticleCollection" value="Article Categories"/>
            
    <add key="ImageCollection" value="Image Galleries"/>
            
    <add key="Archives" value="Archives"/>


  • 相关阅读:
    iOS 新建xib文件时,最外层view的约束问题
    React native 无法弹出调试控件的问题
    从GitHub下载demo时遇到的依赖问题
    Mac 解决 Sourcetree 同步代码总需要密码的问题
    Mac 安装JRE 1.8
    正则表达式-- (.*?) 或 (.*+)
    字符串内有多个#号,每俩#号为一组,JavaScript 截取每组#号之间的字符
    Js/jQuery实时监听input输入框值变化
    Redis设置密码
    redis本机能访问 远程不能访问的问题
  • 原文地址:https://www.cnblogs.com/Clingingboy/p/705027.html
Copyright © 2020-2023  润新知