Skip to content

Commit c5e5e72

Browse files
committed
Start of docs (github-pages)
1 parent 45de685 commit c5e5e72

103 files changed

Lines changed: 4687 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/vendor/
2+
/docs/.bundle
3+
/docs/vendor/

docs/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.DS_STORE
2+
_site/
3+
*.swo
4+
*.swp
5+
_site
6+
.sass-cache
7+
*.psd
8+
*~
9+
.jekyll-metadata

docs/CONTRIBUTING.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
This provides guidance on how to contribute various content to `hack-codegen`.
2+
3+
## Basic Structure
4+
5+
Most content is written in markdown. You name the file `something.md`, then have a header that looks like this:
6+
7+
```
8+
---
9+
docid: getting-started
10+
title: Getting started with ProjectName
11+
layout: docs
12+
permalink: /docs/getting-started.html
13+
---
14+
```
15+
16+
Customize these values for each document, blog post, etc.
17+
18+
> The filename of the `.md` file doesn't actually matter; what is important is the `docid` being unique and the `permalink` correct and unique too).
19+
20+
## Landing page
21+
22+
Modify `index.md` with your new or updated content.
23+
24+
If you want a `GridBlock` as part of your content, you can do so directly with HTML:
25+
26+
```
27+
<div class="gridBlock">
28+
<div class="blockElement twoByGridBlock alignLeft">
29+
<div class="blockContent">
30+
<h3>Your Features</h3>
31+
<ul>
32+
<li>The <a href="http://example.org/">Example</a></li>
33+
<li><a href="http://example.com">Another Example</a></li>
34+
</ul>
35+
</div>
36+
</div>
37+
38+
<div class="blockElement twoByGridBlock alignLeft">
39+
<div class="blockContent">
40+
<h3>More information</h3>
41+
<p>
42+
Stuff here
43+
</p>
44+
</div>
45+
</div>
46+
</div>
47+
```
48+
49+
or with a combination of changing `./_data/features.yml` and adding some Liquid to `index.md`, such as:
50+
51+
```
52+
{% include content/gridblocks.html data_source=site.data.features imagealign="bottom"%}
53+
```
54+
55+
## Docs
56+
57+
To modify docs, edit the appropriate markdown file in `./_docs/`.
58+
59+
To add docs to the site....
60+
61+
1. Add your markdown file to the `./_docs/` folder. See `./doc-type-examples/docs-hello-world.md` for an example of the YAML header format. **If the `./_docs/` directory does not exist, create it**.
62+
- You can use folders in the `./_docs/` directory to organize your content if you want.
63+
1. Update `_data/nav_docs.yml` to add your new document to the navigation bar. Use the `docid` you put in your doc markdown in as the `id` in the `_data/nav_docs.yml` file.
64+
1. [Run the site locally](./README.md) to test your changes. It will be at `http://127.0.0.1/docs/your-new-doc-permalink.html`
65+
1. Push your changes to GitHub.
66+
67+
## Header Bar
68+
69+
To modify the header bar, change `./_data/nav.yml`.
70+
71+
## Top Level Page
72+
73+
To modify a top-level page, edit the appropriate markdown file in `./top-level/`
74+
75+
If you want a top-level page (e.g., http://your-site.com/top-level.html) -- not in `/blog/` or `/docs/`....
76+
77+
1. Create a markdown file in the root `./top-level/`. See `./doc-type-examples/top-level-example.md` for more information.
78+
1. If you want a visible link to that file, update `_data/nav.yml` to add a link to your new top-level document in the header bar.
79+
80+
> This is not necessary if you just want to have a page that is linked to from another page, but not exposed as direct link to the user.
81+
82+
1. [Run the site locally](./README.md) to test your changes. It will be at `http://127.0.0.1/your-top-level-page-permalink.html`
83+
1. Push your changes to GitHub.
84+
85+
## Code Blocks
86+
87+
This template uses [rouge syntax highlighting](https://github.com/jneen/rouge) out of the box. We have [custom CSS](https://github.com/facebook/Site-Templates/blob/master/product-and-feature-docs/first-common-fb-template/_sass/_syntax-highlighting.scss) for when those blocks are rendered. Rouge has plenty of [supported languages](https://github.com/jneen/rouge/wiki/List-of-supported-languages-and-lexers).
88+
89+
## Other Changes
90+
91+
- CSS: `./css/main.css` or `./_sass/*.scss`.
92+
- Images: `./static/images/[docs | posts]/....`
93+
- Main Blog post HTML: `./_includes/post.html`
94+
- Main Docs HTML: `./_includes/doc.html`

docs/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'github-pages', '~> 104', group: :jekyll_plugins

docs/Gemfile.lock

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
activesupport (4.2.7)
5+
i18n (~> 0.7)
6+
json (~> 1.7, >= 1.7.7)
7+
minitest (~> 5.1)
8+
thread_safe (~> 0.3, >= 0.3.4)
9+
tzinfo (~> 1.1)
10+
addressable (2.4.0)
11+
coffee-script (2.4.1)
12+
coffee-script-source
13+
execjs
14+
coffee-script-source (1.12.2)
15+
colorator (1.1.0)
16+
ethon (0.10.1)
17+
ffi (>= 1.3.0)
18+
execjs (2.7.0)
19+
faraday (0.10.1)
20+
multipart-post (>= 1.2, < 3)
21+
ffi (1.9.14)
22+
forwardable-extended (2.6.0)
23+
gemoji (2.1.0)
24+
github-pages (104)
25+
activesupport (= 4.2.7)
26+
github-pages-health-check (= 1.2.0)
27+
jekyll (= 3.3.0)
28+
jekyll-avatar (= 0.4.2)
29+
jekyll-coffeescript (= 1.0.1)
30+
jekyll-feed (= 0.8.0)
31+
jekyll-gist (= 1.4.0)
32+
jekyll-github-metadata (= 2.2.0)
33+
jekyll-mentions (= 1.2.0)
34+
jekyll-paginate (= 1.1.0)
35+
jekyll-redirect-from (= 0.11.0)
36+
jekyll-sass-converter (= 1.3.0)
37+
jekyll-seo-tag (= 2.1.0)
38+
jekyll-sitemap (= 0.12.0)
39+
jekyll-swiss (= 0.4.0)
40+
jemoji (= 0.7.0)
41+
kramdown (= 1.11.1)
42+
liquid (= 3.0.6)
43+
listen (= 3.0.6)
44+
mercenary (~> 0.3)
45+
minima (= 2.0.0)
46+
rouge (= 1.11.1)
47+
terminal-table (~> 1.4)
48+
github-pages-health-check (1.2.0)
49+
addressable (~> 2.3)
50+
net-dns (~> 0.8)
51+
octokit (~> 4.0)
52+
public_suffix (~> 1.4)
53+
typhoeus (~> 0.7)
54+
html-pipeline (2.4.2)
55+
activesupport (>= 2)
56+
nokogiri (>= 1.4)
57+
i18n (0.7.0)
58+
jekyll (3.3.0)
59+
addressable (~> 2.4)
60+
colorator (~> 1.0)
61+
jekyll-sass-converter (~> 1.0)
62+
jekyll-watch (~> 1.1)
63+
kramdown (~> 1.3)
64+
liquid (~> 3.0)
65+
mercenary (~> 0.3.3)
66+
pathutil (~> 0.9)
67+
rouge (~> 1.7)
68+
safe_yaml (~> 1.0)
69+
jekyll-avatar (0.4.2)
70+
jekyll (~> 3.0)
71+
jekyll-coffeescript (1.0.1)
72+
coffee-script (~> 2.2)
73+
jekyll-feed (0.8.0)
74+
jekyll (~> 3.3)
75+
jekyll-gist (1.4.0)
76+
octokit (~> 4.2)
77+
jekyll-github-metadata (2.2.0)
78+
jekyll (~> 3.1)
79+
octokit (~> 4.0, != 4.4.0)
80+
jekyll-mentions (1.2.0)
81+
activesupport (~> 4.0)
82+
html-pipeline (~> 2.3)
83+
jekyll (~> 3.0)
84+
jekyll-paginate (1.1.0)
85+
jekyll-redirect-from (0.11.0)
86+
jekyll (>= 2.0)
87+
jekyll-sass-converter (1.3.0)
88+
sass (~> 3.2)
89+
jekyll-seo-tag (2.1.0)
90+
jekyll (~> 3.3)
91+
jekyll-sitemap (0.12.0)
92+
jekyll (~> 3.3)
93+
jekyll-swiss (0.4.0)
94+
jekyll-watch (1.5.0)
95+
listen (~> 3.0, < 3.1)
96+
jemoji (0.7.0)
97+
activesupport (~> 4.0)
98+
gemoji (~> 2.0)
99+
html-pipeline (~> 2.2)
100+
jekyll (>= 3.0)
101+
json (1.8.3)
102+
kramdown (1.11.1)
103+
liquid (3.0.6)
104+
listen (3.0.6)
105+
rb-fsevent (>= 0.9.3)
106+
rb-inotify (>= 0.9.7)
107+
mercenary (0.3.6)
108+
mini_portile2 (2.1.0)
109+
minima (2.0.0)
110+
minitest (5.10.1)
111+
multipart-post (2.0.0)
112+
net-dns (0.8.0)
113+
nokogiri (1.7.0.1)
114+
mini_portile2 (~> 2.1.0)
115+
octokit (4.6.2)
116+
sawyer (~> 0.8.0, >= 0.5.3)
117+
pathutil (0.14.0)
118+
forwardable-extended (~> 2.6)
119+
public_suffix (1.5.3)
120+
rb-fsevent (0.9.8)
121+
rb-inotify (0.9.7)
122+
ffi (>= 0.5.0)
123+
rouge (1.11.1)
124+
safe_yaml (1.0.4)
125+
sass (3.4.23)
126+
sawyer (0.8.1)
127+
addressable (>= 2.3.5, < 2.6)
128+
faraday (~> 0.8, < 1.0)
129+
terminal-table (1.7.3)
130+
unicode-display_width (~> 1.1.1)
131+
thread_safe (0.3.5)
132+
typhoeus (0.8.0)
133+
ethon (>= 0.8.0)
134+
tzinfo (1.2.2)
135+
thread_safe (~> 0.1)
136+
unicode-display_width (1.1.2)
137+
138+
PLATFORMS
139+
ruby
140+
141+
DEPENDENCIES
142+
github-pages (~> 104)
143+
144+
BUNDLED WITH
145+
1.13.1

0 commit comments

Comments
 (0)