修復feed抓不到title

This commit is contained in:
邱博亞 2023-09-14 10:36:42 +08:00
parent 53c07e53fe
commit 0b4f634460
1 changed files with 2 additions and 2 deletions

View File

@ -33,12 +33,12 @@
if now_index != 0
prev_result = sorted[now_index-1]
prev_url = params['url'] + '/' + prev_result.to_param
prev_content = "<a href='#{prev_url}' title='#{t('announcement.prev')}' class='prev'><b>#{t('announcement.prev')}</b><p>#{prev_result['title'][I18n.locale]}</p></a>"
prev_content = "<a href='#{prev_url}' title='#{t('announcement.prev')}' class='prev'><b>#{t('announcement.prev')}</b><p>#{prev_result['title'].is_a?(String) ? prev_result['title'] : prev_result['title'][I18n.locale]}</p></a>"
end
if now_index != sorted.length-1
next_result = sorted[now_index+1]
next_url = params['url'] + '/' + next_result.to_param
next_content = "<a href='#{next_url}' title='#{t('announcement.next')}' class='next'><b>#{t('announcement.next')}</b><p>#{next_result['title'][I18n.locale]}</p></a>"
next_content = "<a href='#{next_url}' title='#{t('announcement.next')}' class='next'><b>#{t('announcement.next')}</b><p>#{next_result['title'].is_a?(String) ? next_result['title'] : next_result['title'][I18n.locale]}</p></a>"
end
if prev_content != '' || next_content != ''
content = "<div class='see_more_boxTitle'>#{prev_content}#{next_content}</div>".html_safe