|
3 | 3 | The Artsy OSS page and the blog runs on top of a default jekyll install. If you |
4 | 4 | would like an overview of jekyll, their [website rocks](http://jekyllrb.com/). |
5 | 5 |
|
6 | | -## Setup |
| 6 | +## Documentation |
7 | 7 |
|
8 | | -``` |
9 | | -git clone git@github.com:artsy/artsy.github.io.git |
10 | | -cd artsy.github.io |
11 | | -bundle |
12 | | -bundle exec rake bootstrap |
13 | | -bundle exec rake build |
14 | | -``` |
15 | | - |
16 | | -### Common issues ⚠️ |
17 | | - |
18 | | -<details><summary>Issues installing `therubyracer` and/or `v8` dependencies</summary> |
19 | | -Some combination of the following might help resolve issues with installing these dependencies: |
20 | | - |
21 | | -- make sure you have a ruby version that works (e.g. 2.7.5) |
22 | | -- Installing `v8` via homebrew: `brew install v8` |
23 | | -- Installing the `libv8` gem using a specific version and v8 flag: |
24 | | - `gem install libv8 -v '3.16.14.19' -- --with-system-v8` |
25 | | -- Assigning configuration options, as in |
26 | | - [this comment](https://gist.github.com/fernandoaleman/868b64cd60ab2d51ab24e7bf384da1ca#gistcomment-3114668). |
27 | | - |
28 | | -</details> |
| 8 | +- [Getting Started](docs/getting_started.md) - Setup, running locally, and deploying |
| 9 | +- [Authoring Articles](docs/authoring_articles.md) - Writing blog posts, adding authors, and enabling comments |
| 10 | +- [Authoring Podcasts](docs/authoring_podcasts.md) - Adding podcast episodes |
29 | 11 |
|
30 | 12 | ## License |
31 | 13 |
|
32 | 14 | The code in this repository is released under the MIT license. The contents of |
33 | 15 | the blog itself (ie: the contents of the `_posts` directory) are released |
34 | 16 | under +[Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/). |
35 | 17 |
|
36 | | -## Running the OSS Site / Blog locally |
37 | | - |
38 | | -Running `rake serve` will _not_ generate category pages. They take a _long_ time |
39 | | -to generate. No one wants that when working on the site. |
40 | | - |
41 | | -``` |
42 | | - bundle exec rake serve |
43 | | -``` |
44 | | - |
45 | | -Categories are generated when the ENV var `PRODUCTION` = `"YES"`. |
46 | | - |
47 | | -## Deploying |
48 | | - |
49 | | -- Circle automatically deploys to GitHub Pages when new commits are pushed to |
50 | | - the `source` branch. |
51 | | -- If you need to trigger a deploy locally, the `rake deploy` command is |
52 | | - available. |
53 | | -- See the `Rakefile` for details on how builds/deploys are done. |
54 | | -- Note that the `main` branch does not build on Circle, due to all deploy |
55 | | - commits being prefixed with `[skip ci]`. |
56 | | - |
57 | | -## Adding an Author |
58 | | - |
59 | | -Authors are key-value stored, so you will need to give yourself a key inside |
60 | | -[\_config.yml](_config.yml) - for example: |
61 | | - |
62 | | -```yaml |
63 | | -joey: |
64 | | - name: Joey Aghion |
65 | | - github: joeyAghion |
66 | | - twitter: joeyAghion |
67 | | - site: http://joey.aghion.com |
68 | | -``` |
69 | | -
|
70 | | -Everything but name is optional. |
71 | | -
|
72 | | -## Authoring an Article |
73 | | -
|
74 | | -Note: we now have some templates to help get you started writing a blog post. |
75 | | -Check out the [`Post-Templates` directory](Post-Templates). |
76 | | - |
77 | | -TLDR _To generate a new post, create a new file in the `_posts` directory. Be |
78 | | -sure to add your name as the author of the post and include several categories |
79 | | -to file the post under. Here is a sample header YAML:_ |
80 | | - |
81 | | -Note: categories are aggregated from the individual posts, so adding one is as |
82 | | -easy as adding it to your post! |
83 | | - |
84 | | -```yaml |
85 | | ---- |
86 | | -layout: post |
87 | | -title: "Responsive Layouts with CSS3" |
88 | | -date: 2012-01-17 11:03 |
89 | | -comments: true |
90 | | -author: Matt McNierney |
91 | | -github-url: https://www.github.com/mmcnierney14 |
92 | | -twitter-url: http://twitter.com/mmcnierney |
93 | | -blog-url: http://mattmcnierney.wordpress.com |
94 | | -categories: [Design, CSS, HTML5] |
95 | | ---- |
96 | | -``` |
97 | | - |
98 | | -More info can be found in the [Jekyll docs](http://jekyllrb.com/docs/posts/). |
99 | | - |
100 | | -When you have authored an article, `git add` and `git commit` it, then push to a |
101 | | -named branch with `git push origin [branch]`, and create a pull request to the |
102 | | -`source` branch, it will be deployed to the site by travis when merged. |
103 | | - |
104 | | -After you have authored an article, consider re-generating the related articles |
105 | | -data, so that we can surface other articles related to the one you just added. |
106 | | -See **Generating related articles** section below. |
107 | | - |
108 | | -## Enabling Comments |
109 | | - |
110 | | -Comments for articles are managed with |
111 | | -[Issues](https://github.com/artsy/artsy.github.io/issues) in this GitHub |
112 | | -repository. |
113 | | - |
114 | | -#### [Create an issue](https://github.com/artsy/artsy.github.io/issues/new) for the article |
115 | | - |
116 | | -Quote the opening paragraph(s) of the post as the body of the issue, and name it |
117 | | -something like "Comments: My Fantastic New Post". |
118 | | - |
119 | | -#### Add the `Comment Thread` label to the issue |
120 | | - |
121 | | -#### Attach the issue to your article |
122 | | - |
123 | | -Copy the created issue ID; add it to the frontmatter YAML of your post, as the |
124 | | -`comment_id` attribute: |
125 | | - |
126 | | -`comment_id: 1234` |
127 | | - |
128 | | -## After Deploying an Article |
129 | | - |
130 | | -Every article on our blog needs one more thing: a snappy tweet! You can ask Ash |
131 | | -or Orta to do this for you, but you're also welcome to log into the |
132 | | -[@ArtsyOpenSource](https://twitter.com/ArtsyOpenSource) twitter account and |
133 | | -tweet yourself (credentials are in the Engineering 1Password vault). Tweets |
134 | | -usually follow the following format: |
135 | | - |
136 | | -``` |
137 | | -[pithy observation] [description of problem] [@ the article author's twitter handle] |
138 | | -
|
139 | | -📝 [link to blog post] |
140 | | -💻 [link to GitHub repo, if applicable] |
141 | | -📷 [attach a screenshot of the first few paragraphs of the post] |
142 | | -``` |
143 | | - |
144 | | -We attach screenshots of the post because tweets with images get more traction. |
145 | | -But! Images aren't accessible to screen readers, so make sure to use the |
146 | | -twitter.com web interface and add a description to the image when posting: |
147 | | - |
148 | | -> Screenshot of the title and first two paragraphs of the linked-to blog post. |
149 | | - |
150 | | -You can look at previous tweets from our account to get a feel for these. If |
151 | | -you'd like help, just ask in Slack. |
152 | | - |
153 | | -## Authoring a Podcast Episode |
154 | | - |
155 | | -To add a new episode of the podcast, |
156 | | -[configure](https://github.com/aws/aws-sdk-ruby#configuration) your local AWS |
157 | | -environment. The easiest is in environment variables stored in `~/.zshrc` or |
158 | | -equivalent. |
159 | | - |
160 | | -``` |
161 | | -export AWS_ACCESS_KEY_ID= |
162 | | -export AWS_SECRET_ACCESS_KEY= |
163 | | -``` |
164 | | -
|
165 | | -After you have set up the environment, run the following rake task. |
166 | | -
|
167 | | -```sh |
168 | | -rake podcast:new_episode /path/to/local/mp3 |
169 | | -``` |
170 | | - |
171 | | -This will add required YAML to `_config.yml`. You'll need to fill in some other |
172 | | -fields manually; when finished it'll look like this: |
173 | | - |
174 | | -```yaml |
175 | | -- title: Name of your episode |
176 | | - date: (generated by Rake task) |
177 | | - description: A paragraph-long description of the episode. |
178 | | - podcast_url: (generated by Rake task) |
179 | | - file_byte_length: (generated by Rake task) |
180 | | - duration: (generated by Rake task) |
181 | | -``` |
182 | | -
|
183 | | -## Generating related articles |
184 | | -
|
185 | | -Generating the content for the "related articles" section at the bottom of an |
186 | | -article is an offline & manual process that makes use of our staging vector |
187 | | -database. |
188 | | -
|
189 | | -Any developer can run this at any time and commit the resulting changes to |
190 | | -`related-articles.json`. |
191 | | - |
192 | | -There are a few simple prerequisite steps required for this task specifically: |
193 | | - |
194 | | -1. `gem install foreman`, if you haven't already. |
195 | | - |
196 | | -2. `cp .env.example .env`, if you haven't already. |
197 | | - |
198 | | -3. Connect to the staging VPN in order to access the staging instance of |
199 | | - Weaviate, our vector database. |
200 | | - |
201 | | -After that it is just: |
202 | | - |
203 | | -```sh |
204 | | -foreman run bundle exec rake related_articles |
205 | | -``` |
206 | | - |
207 | 18 | ## About Artsy |
208 | 19 |
|
209 | 20 | <a href="https://www.artsy.net/"> |
|
0 commit comments