diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb
index 0bce8b9cdd..540b310011 100644
--- a/app/controllers/home_controller.rb
+++ b/app/controllers/home_controller.rb
@@ -2,7 +2,6 @@
class HomeController < ApplicationController
def index
- @excellent_topics = Topic.excellent.recent.fields_for_list.limit(20).to_a
end
def uploads
diff --git a/app/models/setting.rb b/app/models/setting.rb
index fe59a4b64b..9eaef247c4 100644
--- a/app/models/setting.rb
+++ b/app/models/setting.rb
@@ -38,7 +38,6 @@ def legecy_envs
custom_head_html
navbar_html
footer_html
- index_html
wiki_index_html
wiki_sidebar_html
site_index_html
@@ -79,7 +78,7 @@ def legecy_envs
# = Basic
field :app_name, default: (ENV["app_name"] || "Homeland"), validates: { presence: true }
field :timezone, default: "UTC"
- # Module [topic,home,team,github,editor.code]
+ # Module [topic,team,github,editor.code]
field :modules, default: (ENV["modules"] || "all"), type: :array
# Plugin sort
field :sorted_plugins, default: [], type: :array, separator: /[\s,]+/
@@ -160,7 +159,6 @@ def legecy_envs
field :custom_head_html, default: ""
field :navbar_html, default: ""
field :footer_html, default: ""
- field :index_html, default: ""
field :wiki_index_html, default: ""
field :wiki_sidebar_html, default: ""
field :site_index_html, default: ""
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
deleted file mode 100644
index fb2b715fc8..0000000000
--- a/app/views/home/index.html.erb
+++ /dev/null
@@ -1,31 +0,0 @@
-<% if !mobile? %>
-
- <%= raw Setting.index_html %>
-
-<% end %>
-
-<% if !@excellent_topics.blank? %>
-
-
- <% cache(["home_suggest_topics2", @excellent_topics]) do %>
- <%
- odd_topics, even_topics = @excellent_topics.partition.each_with_index { |t, i| i.odd? }
- %>
-
- <%= render TopicComponent.with_collection(even_topics) %>
-
-
-
- <%= render TopicComponent.with_collection(odd_topics) %>
-
- <% end %>
-
-
-
-<% end %>
-
-<% if !mobile? %>
- <%= render "/shared/hot_locations" %>
-<% end %>
diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb
index 60a176189d..23a93e3ddb 100644
--- a/app/views/shared/_navbar.html.erb
+++ b/app/views/shared/_navbar.html.erb
@@ -1,6 +1,6 @@
<%= render_list_items do |li|
- li << link_to(t("menu.topics"), Setting.has_module?(:home) ? main_app.topics_path : main_app.root_path, class: "nav-link")
+ li << link_to(t("menu.topics"), main_app.root_path, class: "nav-link")
Homeland.navbar_plugins.each do |plugin|
li << link_to(plugin.display_name, plugin.root_path, class: "nav-link")
diff --git a/config/locales/menu.en.yml b/config/locales/menu.en.yml
index b81f2afbec..8b29e7df09 100644
--- a/config/locales/menu.en.yml
+++ b/config/locales/menu.en.yml
@@ -82,7 +82,6 @@
users: "Users"
admin: "Control Panel"
nodes: "Nodes"
- my_home_page: "My home page"
edit_account_path: "Account Profile"
likes: "Favorites"
teams: "Teams"
diff --git a/config/locales/menu.zh-CN.yml b/config/locales/menu.zh-CN.yml
index 3a57919d7d..77272bcaf1 100644
--- a/config/locales/menu.zh-CN.yml
+++ b/config/locales/menu.zh-CN.yml
@@ -85,7 +85,6 @@
users: "会员"
admin: "后台"
nodes: "节点"
- my_home_page: "我的主页"
edit_account_path: "个人资料设置"
likes: "我的收藏"
teams: "公司/组织"
@@ -144,7 +143,7 @@
sorted_plugins: 插件排序,调整这个可以影响插件在导航栏的顺序。请用换行或逗号间隔,比如:"jobs, wiki, press, site"。
timezone: "日期时间显示时区,默认: UTC"
profile_fields: "用户个性资料支持字段,默认:all 可选:[company,twitter,website,tagline,location,alipay,paypal,qq,weibo,wechat,douban,dingding,aliwangwang,facebook,instagram,dribbble,battle_tag,psn_id,steam_id]"
- modules: "启用模块,默认 all 全部开启,可选:[topic,home,team,github,editor.code]"
+ modules: "启用模块,默认 all 全部开启,可选:[topic,team,github,editor.code]"
domain: "网站域名,默认: localhost"
asset_host: "静态资源 CDN,比如:https://assets.your-host.com (如果没有,请留空)"
https: "是否启用 HTTPS"
diff --git a/config/locales/menu.zh-TW.yml b/config/locales/menu.zh-TW.yml
index fcf9d3bf46..1958b785bd 100644
--- a/config/locales/menu.zh-TW.yml
+++ b/config/locales/menu.zh-TW.yml
@@ -85,7 +85,6 @@
users: "會員"
admin: "後臺"
nodes: "節點"
- my_home_page: "我的主頁"
edit_account_path: "個人資料設置"
likes: "我的收藏"
teams: "團體 / 組織"
diff --git a/config/routes.rb b/config/routes.rb
index 847338a76b..419b4a4893 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -13,11 +13,7 @@
resources :devices
resources :teams
- if Setting.has_module?(:home)
- root to: "home#index"
- else
- root to: "topics#index"
- end
+ root to: "topics#index"
match "/uploads/:path(![large|lg|md|sm|xs])", to: "home#uploads", via: :get, constraints: {
path: /[\w\d\.\/\-]+/i
}