您可以直接从 Discourse 管理后台(在自定义中)创建新组件,以覆盖此文件的内容。
参见:Developing Discourse Themes & Theme Components
在新建的组件中,进入“自定义 HTML/CSS”,并在 <head> 中添加以下内容:
<script type="text/x-handlebars" data-template-name="components/user-card-contents">
//此处放置所有 user-card-contents 模板代码
</script>