-
Notifications
You must be signed in to change notification settings - Fork 40
Documentation #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation #148
Conversation
There was a problem hiding this 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: |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 –enclosed by "`---`" chars– 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)) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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" %}} |
There was a problem hiding this comment.
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 /*
?
There was a problem hiding this comment.
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 */%}}
``` | ||
{{%/* caption src="//url-to-the-omage" title="title of image" %}} | ||
caption of the image | ||
{{% /caption */%}} |
There was a problem hiding this comment.
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 */
?
There was a problem hiding this comment.
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)
content/documentation/shortcodes.md
Outdated
|
||
## 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. |
There was a problem hiding this comment.
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/
There was a problem hiding this comment.
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.
content/documentation/shortcodes.md
Outdated
{{%/* codepen slug="SLUG" title="TITLE" height="400" */%}} | ||
``` | ||
|
||
The parameters that the `codepen` shortcode accepts are: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/that the/the/
content/documentation/shortcodes.md
Outdated
|
||
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. |
There was a problem hiding this comment.
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; | ||
``` |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
@dpordomingo Regarding |
CONTRIBUTING.md
Outdated
|
||
Posts are stored under [`post` content directory](content/post) | ||
|
||
A blog post content stored under: `content/post/__POST_FILE_NAME__.md` |
There was a problem hiding this comment.
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 @@ | |||
 | |||
--- | |||
author: vadim |
There was a problem hiding this comment.
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
Great job @dpordomingo !! Thank you so much for proving clear instructions on using blog. Probably a nit, but after trying it locally I only was wondering if Otherwise its 🏎 |
@bzz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the science
category about? We currently show in the landing just technical
and culture
, right?
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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:
- vmarkovtsev on the content;
- platform on the layout.
(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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed.
content/documentation/shortcodes.md
Outdated
|
||
## 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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Ok @vmarkovtsev Let's see how can I handle the "habrahabr" feature |
eea4f5d
to
59e540c
Compare
Thanks for your awesome review folks!!! @rporres I added the flag into the @bzz @marnovo @erizocosmico I considered your requests in the new commits:
@vmarkovtsev
|
59e540c
to
a193e64
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many Thank you all for your deep review! |
Just FYI @erizocosmico is on vacation |
Sure. Just waiting ;) |
a193e64
to
5978368
Compare
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 -> wiiiiiiiiidata/authors.yml
filecontents/post
(no longerupcoming
)draft: true