github.com에서 README.md 작업
README 파일을 업데이트 할 때 github에서 사용하는 경량 마크 업 언어에 너무 익숙하지 않습니다.
내 오픈 소스 라이브러리의 README / wiki 파일에 적합한 마크 업 구문을 작성하는 방법에 대해 읽을 수있는 리소스는 어디에 있습니까?
업데이트 된 README를 내 github 저장소에 푸시하기 전에 "내 브라우저에서 로컬로 문서를 검토"할 수있는 도구가 있습니까?
문제의 마크 업은 Daring Fireball 블로그의 저자 인 John Gruber가 만든 Markdown 입니다. Markdown의 원래 소스는 Daring Fireball-Markdown 에서 찾을 수 있습니다 .
Markdown 방언이 많이 있으며 Github에 대한 문서는 Github Flavored Markdown 페이지 에서 찾을 수 있습니다 .
그 페이지의 좋은 팁 :
Markdown 편집기로 Github 페이지에서 M 을 눌러 치트 시트를 표시합니다.
Github Markdown 실시간 미리보기 페이지를 사용하여 Markdown 문서를 테스트 할 수도 있습니다 .
2012-11-08 업데이트 : Markdown 구문을 표준화하기위한 노력이 진행 중입니다. 참조 제프 앳 우드, 코딩 공포 - 마크 다운의 미래 와 W3C 마크 다운 커뮤니티 그룹 .
2014-09-09 업데이트 : CommonMark 마크 다운 표준 및 사양이 출시되었습니다.
게임에 조금 늦었지만 Python으로 작은 CLI를 작성했습니다. 그것은라고 그립 (Github의 추가 정보 인스턴트 미리보기) . Patrick의 답변에 덧붙여, "내 브라우저에서 내 문서를 로컬로 검토"할 수 있습니다.
다음과 함께 설치하십시오.
$ pip install grip
그리고 그것을 사용하려면 다음을 수행하십시오.
$ grip
그런 다음 방문 localhost:5000
하여 readme.md
해당 위치에서 파일 을 봅니다 .
고유 한 파일을 지정할 수도 있습니다.
$ grip CHANGES.md
포트를 변경하십시오.
$ grip 8080
또는 이전 두 가지를 결합하십시오.
$ grip CHANGES.md 8080
선택적으로 다른 문제에 대한 자동 하이퍼 링크 참조에 대한 repo 컨텍스트를 사용하여 GitHub 기반 마크 다운 (즉, 댓글 및 문제가 렌더링되는 방식)을 렌더링 할 수도 있습니다.
$ grip --gfm --context=username/repo issue.md
간결함을 위해 CLI 도움말을 사용하여 나머지 옵션 및 세부 정보를 참조하십시오.
$ grip -h
주목할만한 특징 :
- 페이지를 GitHub와 똑같이 표시하도록 렌더링합니다.
- 울타리 블록
- Python API
- 링크 된 파일 간 이동
- 렌더링 된 문서를 파일로 내보내기
도움이 되었기를 바랍니다. 그것을 확인하십시오 .
여기에 멋진 온라인 / 라이브 편집기가 있습니다.
http://jbt.github.io/markdown-editor/
Preview
GitHub 에도 버튼이 있습니다.
에서 편집을 클릭했을 때이 버튼이 표시되는 다음 스크린 샷을 참조하십시오 README.md
.
IMHO 라이브 편집기 는 현재 GitHub에서 사용 가능한 편집기 보다 낫습니다.
최신 정보
방금 Markdown
VS를 사용하는 경우 Visual Studio를 검색 한 후 Web Essentials를 설치 하고 Markdown
Visual Studio 내에서 바로 지원을받을 수 있음을 발견했습니다. 멋지다!
다음이 있습니다.
- 구문 강조 => Markdown 구문에 대한 전체 색상 화
- Intellisense for embedded languages (W00T) => GitHub's embedded language feature is fully support by support for the ```language syntax.
- Preview window => See a side-by-side preview window of the rendered HTML
- Compile to HTML => Right-click any Markdown file and select Compile Markdown to HTML. This will generate a .html file nested under the Markdown file and it will stay in sync as the Markdown file changes.
- Custom Stylesheet => You can add a solution specific Stylesheet to control the styles of the preview window.
Details about it here.
Note that since February 2014, with "Rendered Prose Diffs", you also can see the rendered version of a diff on a markdown file:
Commits and pull requests including prose files now feature source and rendered views.
Non-text changes appear with a low-key dotted underline. Hover over the text to see what has changed:
Another option - Github's new text editor, Atom, will render github-flavoured markdown as you edit it. See https://atom.io/
I'm not sure whether it will be free (as in beer) in the long term.
As of today, you can preview, as you edit the file.
I didn't find that the other tools were good enough - I wanted:
- Ability to edit offline
- Not just regular markdown, but the actual Github flavored markdown
This is what I ultimately settled on: https://github.com/ypocat/gfms
> gfms
Github Flavored Markdown Server.
Run in your project's root directory.
Usage: gfms
Options:
-p, --port Port number to listen at. [required]
-h, --host Host address to bind to. [default: "localhost"]
--proxy if behind a proxy, proxy url.
-a, --api Render using Github API.
-n, --no-api-on-reload Disable usage of Github API when the doc is manually reloaded.
So I've aliased:
alias gm='gfms -a -p 8070'
이 -p
옵션을 사용하면 Github API에 도달하고 실제 현재 Github CSS를 사용하므로 놀랄 일이 없습니다.
참고 URL : https://stackoverflow.com/questions/10240125/working-with-readme-md-on-github-com
'programing tip' 카테고리의 다른 글
Firefox 47에서 Selenium 2.53이 작동하지 않음 (0) | 2020.08.10 |
---|---|
파이썬은 무엇에 사용됩니까? (0) | 2020.08.10 |
체스 프로그램을 개발할 때 주어진 값으로 아래 방향 배열을 초기화하는 것의 중요성은 무엇입니까? (0) | 2020.08.10 |
"뚱뚱한"Cocoa Touch Framework를 내보내는 방법 (시뮬레이터 및 장치 용)? (0) | 2020.08.10 |
인스턴스간에 내 Visual Studio Code 설정을 동기화하는 방법이 있습니까? (0) | 2020.08.10 |