이 repo에는 "cortexjs.io"웹 사이트의 소스 파일이 포함되어 있습니다.
git submodule init
git submodule update
# Setup, make a dev build and start a server
npm start # Pick-up changes in the dependent modules
npm run update
# Generate .md files for API and launch local server
npm startnpm run stage
# Make a clean production build.
# Output goes inside submodules/cortex-js.github.io
npm run restart
# Validate that everything works well in the browser then...
npm run deploy
# submodules/cortex-js.github.io (a git submodule) gets pushed to cortex-js.github.io이 사이트는 GitHub 페이지를 사용하여 게시됩니다. GH 페이지를 사용하는 주요 이점은 워크 플로 통합입니다 (Pubshing to GH Trigger triggers 서비스중인 사이트의 자동 업데이트)
사이트의 내용은 주로 Markdown 파일로 작성되며 eleventy 로 처리하여 HTML/CSS로 전환합니다.
메인 eleventy 구성은 사용할 마크 다운의 정의를 포함하여 config/eleventy.js 파일에 있습니다.
Markdown 엔진은 CommonMark를 구현하는 markdown-it 입니다.
mardown-it-attrs 플러그인은 단락 스타일을 허용합니다
이것은 통지입니다. {.Notice-Info}
markdown-it-deflist 플러그인은 PANDC 스타일 정의 목록을 지원합니다.
Term 1
: Definition 1
: Second definition
출력은 submodules/cortex-js.github.io 디렉토리에 있습니다. 이 디렉토리는 cortex-js.github.io repo에 연결된 git 하위 모듈 입니다. 이 repo는 GH Pages에서 게시 한 것입니다 (조직의 경우 전체 리포 만 게시 할 수 있습니다. 프로젝트의 경우 컨텐츠는 A /docs 디렉토리에 포함될 수 있음).
서브 모듈도 참조하십시오.
cortex-js.github.io repo에는 두 개의 추가 파일도 포함되어야합니다.
.nojekyll 은 github 에이 repo의 내용을 Jekyll로 처리해서는 안된다는 것을 나타냅니다 (이것은 이미 Jekyll의 출력이기 때문에).cortexjs.io 의 내용이있는 CNAME 이 파일은 npm run stage 실행할 때 생성됩니다.
cortex-js.github.io Repo의 설정 탭을 사용하여 사용자 정의 도메인 사용을 표시하십시오.
또한 cortexjs.io 의 DNS 항목에는 다음을 포함해야합니다.
www.cortex-js.io cortex-js.io 로 가리키는 cname 레코드 npm run build 명령은 typescript .d.ts 파일에서 API에 대한 문서를 build/ 디렉토리로 생성합니다.
빌드 프로세스는 typedoc 도구를 사용하여 API 헤더 파일을 구문 분석하고 build/ 디렉토리에서 json 파일을 출력합니다.
참고 : 변환기를 디버깅하려면 VSCODE 디버거를 사용하십시오. 디버그> 디버깅 시작을 선택하여 VSCODE에서 바로 디버깅 세션을 시작하십시오.
그런 다음 build-guides 스크립트는 json 파일을 ./src/build 디렉토리의 Markdown으로 변환 한 다음 npm run build 또는 npm start 으로 Eleventy로 처리 할 수 있습니다.
CSS 스타일 정보는 src/_sass/ 로 정의됩니다.
API 문서는 Google Documentation Style Guide (https://developers.google.com/style/api-reference-comments) 및 https://developers.google.com/style을 따라야합니다.
또한 TypeScript 코드는 Google 스타일 가이드를 따라야합니다 : https://google.github.io/styleguide/jsguide.html#naming
이 프로젝트는 이름 지정 프로젝트 스크립트에 대한 GitHub 표준을 따릅니다.
로컬 빌드를 수행하려면 :
npm start준비 할 준비가 된 빌드를 수행하려면 :
npm run stage생성 된 사이트의 "테스트"는 링크를 확인하는 것으로 구성되며 생성 된 HTML이 유효합니다.