Olá, sou novo no Discourse e adoro seus recursos e funcionalidades. Quero personalizar bastante sua aparência e a forma como ele apresenta o conteúdo. Tenho lido vários tópicos e posts tentando entender. Tenho experiência com codificação em JavaScript, mas estou confuso. Por personalizar bastante, quero dizer: remover a barra lateral, adicionar itens de navegação à barra superior. Exibir tópicos com o nome do autor, avatar, assunto e texto de prévia, juntamente com a resposta mais recente e uma prévia da resposta com o avatar e nome do autor da resposta. Tópicos agrupados sob categorias em uma grande lista de categorias e seus tópicos (estilo antigo). Acho que preciso entender como substituir os dados que são exibidos, ou buscados e depois exibidos, e estou confuso sobre a melhor forma de fazer isso. Seria um único “tema”, seria um componente de tema? Seria um plugin? Seriam múltiplos temas, componentes e plugins? Qual a diferença entre um componente e um plugin? Gostaria que houvesse um vídeo no YouTube mostrando o desenvolvimento de um “tema” bastante personalizado como este. Atualmente estou reunindo uma lista de “addons?” que fazem coisas semelhantes ao que quero alcançar e estou tentando ler o código deles e entendê-los, mas, cara, é realmente confuso entrar nisso “de gaiato”. Eu aprendo melhor assistindo a vídeos do que lendo. Alguma dica, conselho ou vídeo que eu possa não ter descoberto? Qualquer ajuda é muito apreciada.
1 curtida
Falco
(Falco)
Novembro 8, 2023, 3:28am
2
Como as alterações que você deseja implicariam buscar dados extras nas páginas, um tema ou um componente não seriam suficientes, você precisa de um plugin para concretizar sua visão.
3 curtidas
Obrigado Tenho muita leitura para fazer. Espero que tudo comece a fazer sentido. Encontrei um tópico muito relevante:
Ideally, when customizing Discourse via themes/plugins, you should use CSS, the JavaScript Plugin API , or plugin outlets . If none of these work for your use-case, feel free to open a PR to Discourse core or start a Dev topic here on Meta. We’re always happy to discuss adding new outlets/APIs to make customization easier.
If you’ve exhausted all other options, you may need to resort to template overrides. This technique allows you to override the entire template of any Ember Component or Route f…
E então, apenas compartilhando alguns links/anotações para outros que possam estar na mesma situação:
Os templates HTML estão em https://github.com/discourse/discourse/tree/main/app/assets/javascripts/discourse/app/templates
Guia para Iniciantes em Temas:
This is a crash course in Discourse theme basics. The target audience is everyone who is not familiar with Discourse themes. If you’ve already used Discourse theme / theme components, this guide is probably not something you need to read.
What are themes and theme components?
A theme or theme component is a set of files packaged together designed to either modify Discourse visually or to add new features.
Let’s start with themes.
Themes
In general, themes are not supposed to be compatible …
Guia para Desenvolvedores de Temas:
Discourse Themes and Theme Components can be used to customize the look, feel and functionality of Discourse’s frontend. This section of the developer guides aims to provide all the reference materials you need to develop simple themes for a single site, right up to complex open-source theme components.
This introduction aims to provide a map of all the tools and APIs for theme development. If you prefer a step-by-step tutorial for theme development, jump straight to:
Themes vs. Theme Compon…
Guia para Designers de Temas:
This is possible, and the method I would reccomend. The only thing you need to be aware of is that these changes will be live on the forum as you make every change.
What I do is set the theme to be user selectable, and change my personal user preference to that theme, while keeping the default theme the choice for all other users. This lets only you see any issues that may arise during theming.
Criando um Componente de Tema:
Componente de Tema para revelar locais de saída de plugins (lugares para injetar novo html/script/estilos):
Contribute to communiteq/plugin-outlets-theme-component development by creating an account on GitHub.
Desenvolvimento de Plugins:
Aprenda a começar a construir coisas:
There are a few ‘how to start’ guides for working with Discourse already and a wealth of useful info on meta, but I thought it might help to give an insight to the mental processes of starting from little, if any, prior coding experience to building substantial Discourse plugins.
Discourse is written by experienced developers and has a large codebase. This can feel intimidating. This intimidation factor can be a significant barrier for novice developers. This is a kind of ‘psychological primer’…
Instale o Discourse no Ubuntu/Debian para Desenvolvimento:
This guide covers installation instructions in a development environment. For a production guide see: Install Discourse in production with the official supported instructions
So you want to set up Discourse on Ubuntu or Debian to hack on and develop with?
We’ll assume that you work locally and don’t have Ruby/Rails/Postgres/Redis installed on your Ubuntu or Debian system. Let’s begin!
Requirements
We suggest having at least 4 GB RAM and 2 CPU cores.
Current compatibility:
O…
O que eu realmente quero modificar é a “topic-list” ou página inicial
• Este tema já criou o formato de tópico-list desejado:
• Nome do Autor + Avatar:
Author name plus avatar ou Show Original Poster Avatars
• Grupos de Categorias:
• Ícones de categorias em destaque:
Também pode experimentar o editor de temas online:
Extras:
• Single Sign On? SSO
DiscourseConnect is a core Discourse feature that allows you to configure “Single Sign-On (SSO)” to completely outsource all user registration and login from Discourse to another site. Offered to our pro, business and enterprise hosting customers .
(Feb 2021) ‘Discourse SSO ’ is now ‘DiscourseConnect ’. If you are running an old version of Discourse, the settings below will be named sso_... rather than discourse_connect_...
The Problem
Many sites wishing to integrate wit…
• Bot do Discord
Purpose of this plugin
This plugin does several things:
Allows you to power a Discord bot using your Discourse server to do stuff to link the two systems. Fork this repo and expand it with simple Ruby to create all kinds of bot functionality.
Existing functionality to serve as examples and useful utility:
Provides some two-way auto posting of content that meet some criteria.
Command to copy messages ad hoc to Discourse
Command to sync group membership to role membership of your Discor…
pfaffman
(Jay Pfaffman)
Novembro 8, 2023, 5:14am
4
Você pode fazer isso clicando no ícone de hambúrguer, então seria bem fácil de descobrir.
Dê uma olhada em Links Personalizados do Cabeçalho
Isso pode te ajudar a começar.
4 curtidas