Subtext--博客基本配置
来源:互联网 发布:et制版软件 编辑:程序博客网 时间:2024/06/05 17:48
Subtext博客配置分两种,一种是存在数据库中的,可以修改,一种则是存在web.config文件中,暂时还没有实现可修改。
看下图
BlogConfigurationSettings类为blog默认设置,其中包括一些集合属性,如AllowedHtmlTags还有Tracking对象等,
Config包含了BlogConfigurationSettings对象,作为站点配置,这里应该说明一下Subtext并非个人版博客,其也可以创建多博客,只是由于URL的原因,让你产生了幻觉:),你看Config就提供了CreateBlog方法,对于我们个人使用可能不太常用.但UpdateConfigData方法绝对很常用.他会更新BlogInfo对象大部分的属性,不管你需要不需要更新,如blog用户名和密码等.
SkinConfig你可以不用去管他,它作为BlogInfo的子属性而存在,当刚创建blog的时候会给出一个默认的skin
数据库可改的属性就不看了,我们来看下web.config里的配置
另外还有AllowableCommentHtml用于过滤评论的html语言,其中集合中的是允许使用的标签
结合代码和配置的话,应该马上就可以看明白.
web.config文件的配置是相当多的,由于此系统主要是个人博客使用为多,所以配置多点也无所谓,一次性搞清楚就好.
另外其他的还有appSetting节点下的一些配置,如UI Text,其由Subtext.Web.UI.UIText读取,这几个是直接显示在页面上的,你可以把它改成中文也可以.
看下图
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>
<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>
<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"/>
<add key="PostCollection" value="Post Categories"/>
<add key="ArticleCollection" value="Article Categories"/>
<add key="ImageCollection" value="Image Galleries"/>
<add key="Archives" value="Archives"/>
- Subtext--博客基本配置
- EntLib.com / Subtext 开源ASP.NET博客系统上线
- Subtext 2.0 支持 Gravatar 博客头像 (个人全球统一标识)
- 轻松搭建博客平台-开源ASP.NET 博客Subtext 的安装
- 轻松搭建博客平台-开源ASP.NET 博客Subtext 的安装
- Subtext--HTTP 模块
- Subtext--RSS的设计
- Subtext--数据库操作
- 使用GitHub + Hexo搭建个人博客(七)- 基本配置
- NodeJS搭建博客系统(一)基本配置与路由控制
- Subtext中的skin实现方法
- 博客基本发布方式
- Subtext--为skin准备相关文件加载
- Git系列博客——(2)git安装和基本配置
- 利用github和hexo一步步生成个人博客(2)---基本配置和发表文章
- 思科-Vlan(虚拟局域网)基本配置命令--Smallbaal的博客
- 基本配置
- 配置基本
- Visual Studio Code Name 'Orcas' Express Editions
- 数据库连接方案比拼
- ASP.NET 2.0服务器控件与组件开发中文版即将出版
- Subtext--HTTP 模块
- Windows Workflow Foundation Web Workflow Approvals Starter Kit
- Subtext--博客基本配置
- Subtext--RSS的设计
- Subtext--数据库操作
- Subtext--为skin准备相关文件加载
- Subtext中的skin实现方法
- Discuz!NT v1.0 正式版发布
- asp.net控件设计时支持(2)-自动格式设置
- asp.net控件设计时支持(1)
- asp.net控件开发基础(22)