Skip to content

Conversation

dpordomingo
Copy link
Contributor

@dpordomingo dpordomingo commented Oct 31, 2017

closes: #90 , #102 , #124 , #143 , https://github.com/src-d/backlog/issues/1058

The important changes are defined by:

The previous commits prepares the blog repository to be "documentable" ;)
Most important changes that has been done (and documented), are:

  • make serve will locally serve the blog -> wiiiiiiiii
  • authors are now stored under data/authors.yml file
  • all posts must be stored under contents/post (no longer upcoming)
  • post that should not yet being published, must be marked as draft: true

Copy link
Contributor

@erizocosmico erizocosmico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! Just some minor grammatical corrections

CONTRIBUTING.md Outdated

While you are developing or creating new contents for the blog, and always before publishing a PR, you should validate your changes locally, specially if you're modifying common features or you're using shortcodes.

To locally serve the blog, you need to satisfy the [project requirements](README.md#requirements), and then to run:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/then to run/then run/

CONTRIBUTING.md Outdated
```shell
make serve;
```
and then, go to [http://localhost:8484](http://localhost:8484)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/and then/Finally/


```
---
author: authorKeyName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also worth to mention that if it's the first time a user is posting on the blog, they should add themselves to the config file with all their data

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

CONTRIBUTING.md Outdated

### Front matter

The **front matter** is the first section inside the content file &ndash;enclosed by "`---`" chars&ndash; where it is defined the content metadata.<br />(Read more about it in the Hugo docs for the [Front Matter section](https://gohugo.io/content-management/front-matter))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/where it is defined the content metadata/where the content metadata is defined/

CONTRIBUTING.md Outdated
- `author`: Defines the authorship as explained in the [authors section](#authors)
- `date`: Date when you plan to publish the post, `2006-01-02` format. **Do not forget to update it before publishing it.**
- `title`: Post title, as it will appear in the very top of the content
- `image`: Defines the content listing image as explained in the [assets section](#assets)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Defines the content listing image/Defines the image that will be shown in the list of posts/

For the caption of the image, it can be used html, markdown and other shortcodes

```
{{%/* caption src="//url-to-the-omage" title="title of image" %}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does it start with /*?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the documentation has been written in a post entry (to use the hugo engine to generate the real display for the examples), the only way I found to avoid hugo to parse the shortcodes source code was introducing them inside comments:

{{%/* caption %}}
This shortcode is not parsed as a shortcode
{{% /caption */%}}

That way it can be properly rendered:
image

```
{{%/* caption src="//url-to-the-omage" title="title of image" %}}
caption of the image
{{% /caption */%}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does it end with */?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as explained by #148 (comment)


## codepen

Whenever it is needed to display something runnable like a demo, an example or a proof of concept, it should be used inside an embedded `codepen` snippet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Whenever it is needed to display something runnable like a demo/Whenever displaying something runnable like a demo is needed/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better as:

Whenever necessary to display content that includes runnable code, like a demo, notebook, an example or a proof of concept, it should be used inside an embedded codepen snippet.

{{%/* codepen slug="SLUG" title="TITLE" height="400" */%}}
```

The parameters that the `codepen` shortcode accepts are:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/that the/the/


Display a Gist (even an IPython Notebook)

If the gist if too height, you can use a `scroll-panel` shortcode to wrap it inside a scollable window.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/if too height/is too big/

{{% gist username gist_id %}}
```shell
make build;
```
Copy link
Contributor

@bzz bzz Oct 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really easy to install and build now!

Do you think we could add make serve line here as well? and http://localhost:8484 would be useful.

It's natural next step to look at it after building and would be nice if users could refresh their memory without "switching the context" and going to any other place

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback @bzz
When you said

"Could you add make serve line here? [...]"

You say so to avoid opening the CONTRIBUTING.md where it is said (here), right?

If so, yes: I can add it to the README.md to have it as a quick hint.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will find it at f45e5a5

@vmarkovtsev
Copy link
Contributor

@dpordomingo Regarding archive, I put there posts published on other sites, e.g. the post on habrahabr.ru in Russian. It is never supposed to be visible in our blog yet there is no place where to put such stuff.

CONTRIBUTING.md Outdated

Posts are stored under [`post` content directory](content/post)

A blog post content stored under: `content/post/__POST_FILE_NAME__.md`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines might make user think that content and post are something different.

How about changing it to something like

To create a new blog post, create new a file under `content/post/__POST_FILE_NAME__.md` using the following content schema.

@@ -1,4 +1,13 @@
![word cloud](http://blog.sourced.tech/post/github_topic_modeling/wordcloud.png)
---
author: vadim
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this is what I was talking about - we do not want to show this old russian post on habrahabr

@bzz
Copy link
Contributor

bzz commented Oct 31, 2017

Great job @dpordomingo !! Thank you so much for proving clear instructions on using blog.
It also has super-nice experience of live edits!

Probably a nit, but after trying it locally I only was wondering if yarn.lock intentionally not in .gitignore? As somebody might commit it.

Otherwise its 🏎

@erizocosmico
Copy link
Contributor

@bzz yarn.lock is intended to be committed.

Copy link
Contributor

@ricardobaeta ricardobaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work @dpordomingo !

I'll give it a try soon(ish) and document any doubts or errors.

Thanks!

Copy link
Member

@marnovo marnovo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. Suggestions/changes/questions added. Overall looking very good!

- `title`: Post title, as it will appear in the very top of the content
- `image`: Defines the content listing image as explained in the [assets section](#assets)
- `description`: Short description of the post. Plain text only; no HTML nor markdown allowed.
- `categories`: An array of at least one of the following: `science`, `technical`, `culture`. If it is not defined, it will not be served by the json blog api, so it will not appear in the source{d} landing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the sciencecategory about? We currently show in the landing just technical and culture, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we only show technical and culture posts.
If you want to drop the science category, already applied to all the ML posts, we should address it via a separated issue, shouldn't we? ;)

CONTRIBUTING.md Outdated

### Formatting the content

It is not allowed to use HTML tags to format the content of the blog.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better as:

It is strictly forbidden to use HTML tags and/or custom to format the content of the blog. These add unnecessary complexity to the blog maintenance and will eventually break in layout changes.

You could even further add:

Offenders will be shot; Survivors will be shot again.


It is not allowed to use HTML tags to format the content of the blog.

If you want/need special formatting for your content, please read the [shortcodes tutorial](https://blog.sourced.tech/documentation/shortcodes)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better as:

If you believe your content really requires a feature that is not currently supported by the current shortcodes, please check the issues and create a feature request. The product owner will evaluate feasibility and the benefit to all users before approving implementation.

CONTRIBUTING.md Outdated
## Peer review
Validate every new contents with [a PR](https://github.com/src-d/blog/pulls), that will be validated by, at least:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better as:

New content must be validated via a PR, by at least both:

(for a sourced pen, the url looks like codepen.io/sourced/pen/slug).
- `user` (_optional_, defaults to sourced) the user in codepen.
- `title`(_optional_, defaults to sourced) a title for the codepen.
Copyright (c) 2015 Máximo Cuadros, see [LICENSE](LICENSE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed.


## codepen

Whenever it is needed to display something runnable like a demo, an example or a proof of concept, it should be used inside an embedded `codepen` snippet.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better as:

Whenever necessary to display content that includes runnable code, like a demo, notebook, an example or a proof of concept, it should be used inside an embedded codepen snippet.

README.md Outdated
This is our [blog](https://blog.sourced.tech) source. It uses fancy technologies, such as:
- [Hugo](http://gohugo.io/)
- [Caddy](https://caddyserver.com/)
This is our [blog](https://blog.sourced.tech) source.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the repository for the source{d} blog, which generates styled static HTML from markdown files.

If you came here to learn how to set up the blog in your computer, to write/preview/deploy a new blog post, you should check:

README.md Outdated
### Gist

Display a Gist (even an IPython Notebook)
You need to satisfy the [project requirements](#requirements), and then to run:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to run that the project root dir, right?

Also we must make clearer what does it mean/happens when you build it.

README.md Outdated
```
{{% codepen slug="aaaaaa" title="My post example" %}}
```
If you want to contribute to this project, you will find more info in the [CONTRIBUTING.md](CONTRIBUTING.md)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to contribute to this project, or to write or edit a blog post, you will find more info in the contribution guidelines.

### YouTube video
The blog also uses:
- [Hugo](http://gohugo.io): to build the static html from the markdown content files; it is automatically downloaded and installed at building time.
- [Caddy](https://caddyserver.com): to serve the static files in production; it is provided by the caddy docker image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these be any version? Any additional steps people have to do after installing them in their system?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No additional steps. As it is said for each of one of them, they are provided at build stage or by the docker image.
They're listed here to let the developer to know in which context the blog will run.

@dpordomingo
Copy link
Contributor Author

Ok @vmarkovtsev Let's see how can I handle the "habrahabr" feature

@dpordomingo
Copy link
Contributor Author

dpordomingo commented Oct 31, 2017

Thanks for your awesome review folks!!!

@rporres I added the flag into the make serve as we agreed
53531d1

@bzz @marnovo @erizocosmico I considered your requests in the new commits:

  • REVIEW. Alex to the README.md for 'make serve' dev rule
    e8315bb
  • REVIEW. Marcelo and Miguel to the docs 762b072

@vmarkovtsev upcoming/id2vec was redirected to staging, and habrahabr post was restored

@dpordomingo dpordomingo changed the base branch from master to release/v1.1 October 31, 2017 21:04
Copy link
Member

@marnovo marnovo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Contributor

@bzz bzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@dpordomingo
Copy link
Contributor Author

Many Thank you all for your deep review!
@erizocosmico @vmarkovtsev Does my changes satisfies your requirements?

@bzz
Copy link
Contributor

bzz commented Nov 3, 2017

Just FYI @erizocosmico is on vacation

@dpordomingo
Copy link
Contributor Author

Sure. Just waiting ;)

@dpordomingo dpordomingo merged commit 9ccc989 into src-d:release/v1.1 Nov 8, 2017
@dpordomingo dpordomingo deleted the documentation branch November 8, 2017 06:21
This was referenced Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants