Discourse 테마 CLI 콘솔 앱을 설치하여 테마를 개발하세요

discourse Discourse 테마 CLI는 Discourse 테마 및 테마 컴포넌트를 개발할 때 원하는 편집기를 사용할 수 있도록 해주는 루비(Gem)입니다. 파일을 저장하면 CLI가 원격 테마 또는 컴포넌트를 업데이트하며, 변경 사항이 실시간으로 표시됩니다!

설치

시작하려면 Ruby 2.5 이상이 설치되어 있는지 확인하세요.

Windows를 사용하는 경우 두 가지 옵션이 있습니다:

옵션 1: Windows용 Linux 서브시스템(WSL).

Windows 10에서는 완전한 Linux 환경을 사용할 수 있으며, sudo apt-get install ruby 명령을 통해 간단히 Ruby를 설치할 수 있습니다. 이렇게 하면 Ruby 2.3이 설치됩니다.

옵션 2: 구형 Windows

구형 Windows 버전에서는 WSL에 접근할 수 없으며, Ruby Installer를 통해 Ruby를 쉽게 설치할 수 있습니다. 권장 버전과 기본 설치 설정을 선택하세요.

Mac OS 버전 10.13.3에는 Ruby 2.3이 기본적으로 포함되어 있어 특별한 조치가 필요하지 않습니다. 이전 버전의 Mac OS를 사용 중이라면 최신 Ruby를 설치하기 위해 rvm, rbenv 또는 homebrew를 사용하는 것을 고려해 보세요.


Ruby 2.2 이상이 실행 중이라면 터미널이나 명령 프롬프트를 열고 다음을 실행하세요:

gem install discourse_theme

설치가 완료되면, 더 많은 정보를 얻으려면 다음을 실행하세요:

discourse_theme

업그레이드

gem update discourse_theme

기능

CLI는 3가지 주요 기능을 제공합니다:

discourse_theme new

discourse_theme new YOUR_DIR_NAME을 사용하여 새 테마를 빠르게 생성할 수 있습니다.

discourse_theme watch

discourse_theme watch YOUR_DIR_NAME을 사용하여 테마를 모니터링하고 Discourse 사이트와 동기화(실시간 새로 고침 포함)할 수 있습니다.

이것은 사용자 자신의 편집기를 사용하여 테마를 편집하면 사이트가 마법처럼 :unicorn: 변경 사항을 반영한다는 의미입니다!

discourse_theme download

discourse_theme download YOUR_DIR_NAME을 사용하여 Discourse에서 기존 테마를 다운로드할 수 있습니다. 이후 바로 "watch"를 시작할 수 있는 옵션이 제공됩니다!

자격 증명

API 키를 생성해야 합니다. 관리자 영역으로 이동하여 키를 생성하세요.

  • :exclamation: 키 생성 시 "User Level"을 All Users가 아닌 Single User로 선택하세요.
  • :exclamation: Global Key를 반드시 선택하지 않으면 403 forbidden 오류가 발생할 수 있습니다.

자격 증명은 (선택적으로) ~/.discourse_theme에 저장됩니다. API 키는 사이트별로 저장되며, 각 디렉토리의 URL/테마 ID도 추적됩니다. 설정을 변경해야 하는 경우, 어떤 명령어에든 --reset을 추가하면 모든 값에 대해 다시 프롬프트가 표시됩니다.

사용자 후기

“이 도구는 정말 보석(GEM)입니다!” @awole20
“정말 정말 좋습니다.” @awesomerobot
“동작합니다 :slight_smile: 그리고 꽤 멋지고 멋집니다. 좋아요!” @angus
“오 마이 갓. 믿을 수 없습니다.” @pfaffman


이 문서는 버전 관리되며, 변경 사항을 github에서 제안할 수 있습니다.

79개의 좋아요
Theme Creator, create and show themes without installing Discourse!
CSS Theme Contest (with Prizes!)
Customizing handlebars templates
Setting up a solid workflow for custom theme development
Theme Developer Quick Reference Guide
Structure of themes and theme components
Automating Discourse Plugin Setup with `create-discourse-plugin` gem
Developing Plugins Faster by separating the frontend into a theme component
Feedback on "on-discourse" javascript for setting up custom JS for each page?
Add settings to your Discourse theme
Get started with Theme Creator and the Theme CLI
Designer's Guide to getting started with themes in Discourse
Split up theme Javascript into multiple files
Updated Custom Header Icon: Post Data via URL
Theme Developer Tutorial: 2. Creating a remote theme
Developing Discourse Themes & Theme Components
Hiding GUI elements for new users (less overwhelming)
Add custom content that only appears on your homepage
Custom CSS/HTML
If you want to edit this theme, you must submit a change on its repository
Edit CSS/HTML editor cursor offset makes it unusable due to CSS font override
How "difficult" is modifying/extending Discourse for a backend dev
Exporting a Theme from Staging and Importing it to the Production portal
Using Plugin Outlet Connectors from a Theme or Plugin
Downloaded component installs fine, but does not once changed/re-zipped
What are the benefits of a dev environment?
3.2.0.beta2-dev (7019dbcfe1) does not load CSS from common.scss anymore
End-to-end system testing for themes and theme components
Different CSS changes for different color schemes
Need help integrating code wrote on Edittext to the Discourse
Need help integrating code wrote on Edittext to the Discourse
Remote themes not in database
How to easily edit my site remotely?
When to use a plugin vs theme component?
Discourse core is switching to pnpm for JS package management
Using the new custom-homepage feature
Focus the editor when title is pre-filled
Cannot put the template in the desired outlet
Is this the correct way to create a theme component?
Split up theme Javascript into multiple files
Canvas Theme Template
Getting error while uploading theme
[Zotero extension +] Firefox v116 on macOS broken Discourse?
Install Discourse for development using Docker
How to install plugins without using a third-party host?
How to add a custom button in user profile card?
Import site theme via console
How are theme setting fields created?
Customisability in discourse?
Discourse Theme CLI is the bomb
Discourse 2.0.0.beta5 Release Notes
How difficult would it be to make the Discourse UI more like Flarum?
Discourse-webpack: A boilerplate for developing JS-heavy Discourse components
Import Error: about.json does not exist, or is invalid
How to Add Unique HTML Content Below Topic Body in discourse forum for Specific Topics
Reuse Discourse Hamburger Functionality
Themes - Add a description field
Create and share a font theme component
Customisability in discourse?
How to create a theme (if I am a pure end user)
Linting configuration
Linting configuration
Is it possible to use a local plugin directory with a docker install?
How to overrule a color variable for one theme only?
Can't customize text on custom button in template override using UI
Is it possible to use theme component from local folder (as plugin) - for local development?
Restrict editing of remote themes
When exporting a theme, I get a broken archive