Skip to content

Commit

Permalink
Merge pull request #258 from Jinvic/dev
Browse files Browse the repository at this point in the history
feature: 自定义RSS链接
  • Loading branch information
xuewenG authored Jan 23, 2025
2 parents 71bea4d + f97949c commit d065a41
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/vo/sysConfig_vo.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type SysConfigVO struct {
BeiAnNo string `json:"beiAnNo,omitempty"` //备案号码
Css string `json:"css,omitempty"` //自定义css
Js string `json:"js,omitempty"` //自定义js
Rss string `json:"rss,omitempty"` //自定义rss
EnableGoogleRecaptcha bool `json:"enableGoogleRecaptcha"` //是否启用google recaptcha
GoogleSiteKey string `json:"googleSiteKey,omitempty"` //google recaptcha siteKey
EnableComment bool `json:"enableComment"` //是否启用评论
Expand All @@ -41,6 +42,7 @@ type FullSysConfigVO struct {
BeiAnNo string `json:"beiAnNo,omitempty"` //备案号码
Css string `json:"css,omitempty"` //自定义css
Js string `json:"js,omitempty"` //自定义js
Rss string `json:"rss,omitempty"` //自定义rss
S3 S3VO `json:"s3"` //S3相关信息
EnableGoogleRecaptcha bool `json:"enableGoogleRecaptcha"` //是否启用google recaptcha
GoogleSiteKey string `json:"googleSiteKey,omitempty"` //google recaptcha siteKey
Expand Down
6 changes: 6 additions & 0 deletions front/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ useHead({
rel: 'apple-touch-icon-precomposed',
href: sysConfigVO.favicon || '/favicon.png',
},
{
rel: 'alternate',
type: 'application/rss+xml',
title: '我的 RSS 订阅',
href: sysConfigVO.rss || '',
},
],
style: [
{
Expand Down
4 changes: 4 additions & 0 deletions front/pages/sys/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
<UFormGroup label="自定义JS" name="js" :ui="{label:{base:'font-bold'}}">
<UTextarea v-model="state.js" :rows="5"/>
</UFormGroup>
<UFormGroup label="自定义RSS" name="rss" :ui="{label:{base:'font-bold'}}">
<UTextarea v-model="state.rss" :rows="1"/>
</UFormGroup>
<UFormGroup label="评论最大字数" name="maxCommentLength" :ui="{label:{base:'font-bold'}}">
<UInput v-model.number="state.maxCommentLength"/>
</UFormGroup>
Expand Down Expand Up @@ -119,6 +122,7 @@ const state = reactive({
beiAnNo: "",
css: "",
js: "",
rss: "",
enableS3: false,
s3: {
domain: "",
Expand Down

0 comments on commit d065a41

Please sign in to comment.