아래는 매우 상세한 설명입니다. 설명대로 작동하지 않으면 알려주세요.
-
아직 GitHub 계정이 없다면 하나를 생성하세요.
-
Discourse에서 테마를 내보냅니다:
Admin(관리자) → Customize(커스터마이즈) → 내보낼 테마를 선택하세요.
이렇게 하면 테마가 컴퓨터에 .zip 파일로 저장됩니다.
-
컴퓨터에서 파일을 압축 해제하세요.
-
GitHub에 가서 새 저장소(New repository)를 생성하세요:
-
"uploading an existing file"을 클릭하세요.
-
내보낸 테마에서 압축을 푼 폴더와 파일(아래와 같은 형태여야 합니다)을
컴퓨터에서 저장소로 드래그한 뒤 "Commit Changes"를 클릭하세요.
- 이제 about.json 파일을 편집할 수 있습니다. 파일 이름을 클릭하세요.
파일은 다음과 같은 형태여야 합니다.
{
"name": "Default",
"component": false,
"license_url": null,
"about_url": null,
"authors": null,
"theme_version": null,
"minimum_discourse_version": null,
"maximum_discourse_version": null,
"assets": {
"badge": "assets/badge.png"
},
"color_schemes": {
"blue-light": {
"primary": "22262a",
"secondary": "fefefe",
"tertiary": "2572e4",
"quaternary": "518ee9",
"header_background": "1550a7",
"header_primary": "fcfcfc",
"highlight": "9edaf5",
"danger": "ff7114",
"success": "85cc54",
"love": "de0100"
}
},
"learn_more": "https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966"
}
- 편집 연필 아이콘을 클릭하세요.
이제 편집할 수 있습니다. 컬러 스킴의 이름을 변경하는 것을 권장합니다. 그렇지 않으면 테마를 사이트로 다시 가져올 때 같은 이름을 가진 서로 다른 두 개의 컬러 스킴이 생성됩니다. 따라서 아래에서는 "blue-light": {를 "blue-lite": {로 변경했습니다.
love 값 뒤에 쉼표를 포함시키고, 컬러 스킴의 끝부분 love 뒤에 색상 변수 오버라이드를 추가하기만 하면 됩니다.
"name": "Default",
"component": false,
"license_url": null,
"about_url": null,
"authors": null,
"theme_version": null,
"minimum_discourse_version": null,
"maximum_discourse_version": null,
"assets": {
"badge": "assets/badge.png"
},
"color_schemes": {
"blue-lite": {
"primary": "22262a",
"secondary": "fefefe",
"tertiary": "2572e4",
"quaternary": "518ee9",
"header_background": "1550a7",
"header_primary": "fcfcfc",
"highlight": "9edaf5",
"danger": "ff7114",
"success": "85cc54",
"love": "de0100",
"primary-high": "333333",
"primary-medium": "666666",
"primary-low-mid": "999999",
"primary-low": "cccccc"
}
},
"learn_more": "https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966"
}
-
"Commit Changes"를 클릭하세요.
-
저장소 이름으로 돌아가기 위해 저장소 이름을 클릭하세요.
-
Clone or Download 링크를 복사하세요.
-
Discourse에서 테마를 가져옵니다:
Admin(관리자) → Customize(커스터마이즈) → Install(설치) → From a git repository: 링크를 붙여넣고 Install(설치)을 클릭하세요.
-
이제 이 테마를 로컬 테마와 마찬가지로 사용자 정의 $primary-high, $primary-medium, $primary-low-mid 및 $primary-low 값으로 편집할 수 있습니다.