diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000000..f9304830ce
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,2 @@
+public
+.cache
diff --git a/.eslintrc.json b/.eslintrc.json
index 4649e5b191..c1e63c0b04 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -37,9 +37,11 @@
"src/gatsby/**/*.js",
"src/components/PageWrapper/index.js",
"scripts/**/*.js",
+ "config/**/*.js",
"src/server/**/*.js",
"plugins/**/*.js",
- "gatsby-*.js"
+ "gatsby-*.js",
+ "postcss.config.js"
],
"rules": {
"@typescript-eslint/no-var-requires": "off",
diff --git a/README.md b/README.md
index b1bcb3fd6f..61c27fd97d 100644
--- a/README.md
+++ b/README.md
@@ -3,119 +3,49 @@
[![Maintainability](https://api.codeclimate.com/v1/badges/5872e0a572ec8b74bd8d/maintainability)](https://codeclimate.com/github/iterative/dvc.org/maintainability)
[![CircleCI](https://circleci.com/gh/iterative/dvc.org.svg?style=svg)](https://circleci.com/gh/iterative/dvc.org)
-[DVC](https://github.com/iterative/dvc) project documentation and website source
-code.
+[DVC](https://github.com/iterative/dvc) project website's source code.
+[Documentation](https://dvc.org/doc) and [blog](https://dvc.org/blog) content.
+Contributions to are welcome!
-## Installation
+# Contributing Docs
-Make sure you have the latest LTS version of [Node.js](https://nodejs.org) and
-[Yarn](https://yarnpkg.com) installed.
-
-Run `yarn`.
-
-## Commands
-
-- `yarn develop` - run dev server with hot reload.
-- `yarn build` - build static assets to `public` folder.
-- `yarn serve` - run static server over the `public` folder content to check
- build results.
-- `yarn lint-ts` - lint `.ts` and `.tsx` for compilance with code style and
- check its for type errors.
-- `yarn lint-css` - lint `.css` files for compilance with code style.
-
-## ENV variables
-
-- `GA_ID` – id of the Google Analytics counter.
-- `ANALYZE` - boolean prop to run webpack-analyzer
-- `SENTRY_DSN` - sentry dsn url for tracking errors
-
-## Technologies
-
-This docs engine was built using [Gatsby.js](https://www.gatsbyjs.org/).
-[Algolia](https://www.algolia.com/products/search/) uses to provide full text
-search.
+Please see our
+[Contributing guide](https://dvc.org/doc/user-guide/contributing/docs) for more
+details.
-Please feel free to use it for your own sites and
-[reach out to us](https://dvc.org/support) if you have any questions.
+[![](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/images/0)](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/links/0)
+[![](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/images/1)](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/links/1)
+[![](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/images/2)](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/links/2)
+[![](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/images/3)](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/links/3)
+[![](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/images/4)](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/links/4)
+[![](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/images/5)](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/links/5)
+[![](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/images/6)](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/links/6)
+[![](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/images/7)](https://sourcerer.io/fame/shcheklein/iterative/dvc.org/links/7)
-# Contributing
+# Writing a blog post
-We welcome contributions to the DVC docs by the community!
+Please, [contact us](mailto:support@dvc.org) if you'd like to write something
+cool together or publish your content on our [blog](https://dvc.org/blog).
-You can refer to our
-[Contributing guide](https://dvc.org/doc/user-guide/contributing/docs) for more
-details. Thank you!
+Please see our
+[Writing a Blog Post guide](https://dvc.org/doc/user-guide/contributing/blog)
+for more details on how to write and submit a new blog post.
-**If you need help:**
+# Getting help
If you have any questions, please join the [community](https://dvc.org/chat) and
use the `#dev-docs` channel to discuss any issues in our website or docs. We are
very responsive and happy to help.
-# Writing blog posts
-
-Create `.md` file in the `content/blog` folder. File name will be used as
-`slug`.
-
-Write frontmatter in the following format:
-
-```yml
----
-title: Hello World
-date: '2015-05-01T22:12:03.284Z'
-description: 'Hello World'
-descriptionLong: |
- Some long
- multiline
- text
-picture: /uploads/image.jpeg
-pictureComment: Some Comment
-author: ../authors/author_name.md
-tags:
- - Open Source
- - Machine Learning
- - Data Science
- - Version Control
- - AI
----
-
-```
-
-- `title` - **Required.** Title of the post.
-- `date` - **Required.** Post date. Will be used to sort posts and in RSS.
-- `description` - **Required.** Short description to show in the feed.
-- `descriptionLong` - Optional long description to show before image on the post
- page. If not set, `description` will be used instead.
-- `picture` - Optional cover image.
-- `pictureComment` - Optional cover image comment.
-- `author` - **Required** Relative path to `.md` file with information about the
- author.
-- `tags` - Optional list of tags.
-
-## Adding authors
-
-Create `.md` file in the `content/authors` folder.
-
-Write frontmatter in the following format:
-
-```yml
-path: ../authors/relative_path_to_file.md
-name: Author's Name
-avatar: /uploads/avatar.jpeg
-```
-
-- `path` - **Required** String that the CMS will insert to the author field in
- the blog post. Should be equal to the path from the blog post to the author's
- `.md` file.
-- `name` – **Required** Author's name.
-- `avatar` - **Required** relative path to the author's avatar.
-
# Copyright
-This project is distributed under the Apache license version 2.0 (see the
-LICENSE file in the project root).
+Source code of this project is distributed under the Apache license version 2.0
+(see the LICENSE file in the project root).
-By submitting a pull request for this project, you agree to license your
-contribution under the Apache license version 2.0 to this project.
+Except where otherwise noted, documentation, blog content, images are licensed
+under a [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) license.
-If you use images, please make a reference to the original site.
+By submitting a pull request for this project, you agree to license your
+contribution under the Apache license 2.0 (source code) or CC BY 4.0
+(documentation). Exceptions could be made to content and any other materials
+that are published on our [blog](https://dvc.org/blog).
diff --git a/content/blog/2019-06-26-june-19-dvc-heartbeat.md b/content/blog/2019-06-26-june-19-dvc-heartbeat.md
index f602b77202..493ce48978 100644
--- a/content/blog/2019-06-26-june-19-dvc-heartbeat.md
+++ b/content/blog/2019-06-26-june-19-dvc-heartbeat.md
@@ -104,10 +104,10 @@ image="/uploads/images/2019-06-26/first-impressions-of-data-science-version-cont
> this mix offering a cleaner solution, specifically targeting Data Science
> challenges.
-- **[Versioning and Reproducibility with MLV-tools and DVC](https://github.com/peopledoc/mlv-tools-tutorial):
- [Talk](https://peopledoc.github.io/mlv-tools-tutorial/talks/pyData/presentation.html#/)
+- **[Versioning and Reproducibility with MLV-tools and DVC](https://github.com/peopledoc/mlvtools-tutorial):
+ [Talk](https://peopledoc.github.io/mlvtools-tutorial/talks/pyData/presentation.html#/)
and
- [Tutorial](https://peopledoc.github.io/mlv-tools-tutorial/talks/workshop/presentation.html#/)
+ [Tutorial](https://peopledoc.github.io/mlvtools-tutorial/talks/workshop/presentation.html#/)
by [Stéphanie Bracaloni](https://github.com/sbracaloni) and
[Sarah Diot-Girard](https://github.com/SdgJlbl).**
diff --git a/content/blog/2020-03-31-reimagining-devops-video.md b/content/blog/2020-03-31-reimagining-devops-video.md
index 6bba8ecc10..09bb8be5ca 100644
--- a/content/blog/2020-03-31-reimagining-devops-video.md
+++ b/content/blog/2020-03-31-reimagining-devops-video.md
@@ -16,6 +16,7 @@ tags:
- CI/CD
- DevOps
- MLOps
+ - DivOps
---
Last week, DVC was part of [DivOps](https://divops.org/), a fully remote
diff --git a/content/blog/2020-04-06-april-20-dvc-heartbeat.md b/content/blog/2020-04-06-april-20-dvc-heartbeat.md
new file mode 100644
index 0000000000..c882f996c9
--- /dev/null
+++ b/content/blog/2020-04-06-april-20-dvc-heartbeat.md
@@ -0,0 +1,172 @@
+---
+title: April '20 DVC❤️Heartbeat
+date: 2020-04-06
+description: |
+ Catch up on new DVC releases, talks, and projects in our community.
+ This month, learn what we're up to in MLOps, CI/CD, and the
+ intersection of data science and software engineering.
+
+descriptionLong: |
+ Every month we share news, findings, interesting reads, community takeaways,
+ and everything else along the way.
+
+ Look here for updates about [DVC](https://dvc.org), our journey as a startup,
+ projects by our users and big ideas about best practices in ML and data
+ science.
+picture: ../../static/uploads/images/2020-04-06/april_header.png
+pictureComment:
+ A view from [Barrancas del
+ Cobre](https://en.wikipedia.org/wiki/Copper_Canyon), shot by Jorge Orpinel
+ Pérez. Jorge has mastered the art of working on DVC remotely.
+author: ../authors/elle_obrien.md
+commentsUrl: https://discuss.dvc.org/t/april-20-heartbeat/347
+tags:
+ - Heartbeat
+ - Google Drive
+ - MLOps
+ - CI/CD
+ - Podcast
+ - DivOps
+---
+
+Welcome to the April Heartbeat, our
+[monthly roundup of cool happenings](https://dvc-landing-april-heart-6d0onb.herokuapp.com/tags/heartbeat),
+good reads and other bright spots in our community.
+
+## News
+
+**Adapting to the pandemic.** Although the world seems different than when we
+posted last month, the DVC community is steady and strong. As a predominantly
+distributed company, we've been developing our infrastructure for remote work
+from the get-go. It isn't always _easy_ to schedule an all-hands meeting across
+9 time zones but we make it work. This experience has prepared us well for the
+COVID-19 pandemic: although there are new challenges (like caring for families
+while working from home) we've been able to weather the transition to fully
+remote work relatively well.
+
+![](/static/uploads/images/2020-04-06/laptop_on_boat.jpeg)_Before social
+distancing started, DVC technical writer Jorge Orpinel Pérez has worked from a
+canoe. Check out more photos from his workations
+[on Instagram](https://www.instagram.com/workationer/)._
+
+**DVC sponsors DivOps.** In a time when many conferences are going remote out of
+necessity, we were fortunate to be part of an _intentionally_ remote conference
+this month! We sponsored [DivOps](https://divops.org/), a fully-online meeting
+led by women in DevOps. The DivOps lineup included speakers from GitHub,
+DropBox, Gremlin and more. DVC data scientist Elle (that's me!) gave a
+ten-minute talk about MLOps and CI/CD, so
+[please check out the video](https://dvc.org/blog/reimagining-devops-video).
+Another very relevant talk was from Anna Petrovicheva, CEO of
+[Xperience AI](http://xperience.ai/); Anna
+[spoke about her team's development workflow for deep learning projects](https://youtu.be/8nwpCQufeE0)
+and gave a clear overivew of how they use DVC.
+
+**DVC on the airwaves.** In early March, Elle was interviewed on an episode of
+[The Data Stream podcast](https://open.spotify.com/show/5w4sAKB0fT6lGCELZAMIBh)
+about a DVC data science project,
+[building a public dataset of posts](https://dvc.org/blog/a-public-reddit-dataset)
+from the "Am I the Asshole?" subreddit.
+
+
+
+## New releases
+
+This month, DVC has
+[released some new features](https://github.com/iterative/dvc/releases) and
+updates:
+
+- Did you know you can use Google Drive for remote storage with DVC? We've been
+ hard at work delivering the best performance with Google Drive and are
+ thrilled to invite users to try it out. Brand new
+ [docs](https://dvc.org/doc/user-guide/setup-google-drive-remote#setup-a-google-drive-dvc-remote)
+ explain how to get started.
+- We're introducing the `metrics diff` functionality, which lets you compare
+ metrics from different commits side-by-side
+ ([check out the docs](https://dvc.org/doc/command-reference/metrics/diff) to
+ learn more)
+- Windows users, we are here for you. Contributor
+ [Charles Baynham](https://github.com/charlesbaynham) helped us get better
+ performance on copy operations in Windows.
+
+## From the community
+
+**DVC and R working together** One of our favorite blogs this month came from
+Marcel Ribeiro-Dantas, a developer and PhD student at the
+[Institut Curie](https://institut-curie.org/). Marcel wrote about using DVC to
+manage projects in R, particularly defining and versioning pipelines of data
+processing and analysis that can be reproduced easily. While DVC is language
+agnostic, much of our user content has been Python-centric, so it's exciting to
+see a detailed post for the R-using data scientist (for more about R with DVC,
+see
+[Marija Ilić's post](https://dvc.org/blog/r-code-and-reproducible-model-development-with-dvc))!
+
+
+
+Also, Marcel recently gave an interview on
+[The Data Hackers Podcast](https://medium.com/data-hackers/health-data-e-o-coronav%C3%ADrus-data-hackers-podcast-22-2b059d460cb1),
+a Portuguese-language show. Listen for a shout-out about DVC!
+
+**DVC is in another book!** Last month we reported that DVC is part of a Packt
+book,
+["Learn Python by Building Data Science Applications"](https://www.packtpub.com/programming/learn-python-by-building-data-science-applications).
+This month, DVC got a mention in a just-released O'Reilly book,
+["Building Machine Learning Pipelines"](https://www.oreilly.com/library/view/building-machine-learning/9781492053187/)
+by Hannes Hapke and Catherine Nelson.
+
+
+
+**Some more links we like.** Here are a few other discussions that have caught
+our attention.
+
+- **MLOps can be fun.** Jeroen France's blog, "MLOps: Not as boring as it
+ sounds!", reads like a "coming of age" story about embracing engineering as a
+ data scientist. It's part-motivational, part tutorial- definitely worth a
+ read. Here's a sample:
+
+ > No-one wants to baby-sit, maintain, and troubleshoot their own models once
+ > they are in production. Every data scientist secretly hopes they can pawn
+ > that job off to an engineering team, or maybe an intern, right? Well, in
+ > fact MLOps is going to make your data science life a lot better.
+
+- **Leveling up your Jupyter notebooks.** In a series called
+ ["How to Use Jupyter Notebooks in 2020"](https://ljvmiranda921.github.io/notebook/2020/03/16/jupyter-notebooks-in-2020-part-2/),
+ Lj Miranda discusses how to use Jupyter Notebooks in a mature software
+ development workflow. He makes several recommendations for tools, including
+ DVC.
+
+- **Reddit discussion about CI/CD** When we shared around our DivOps conference
+ presentation on Reddit, some
+ [great discussion happened](https://www.reddit.com/r/MachineLearning/comments/fshh9p/p_a_talk_about_adapting_cicd_systems_for_ml_full/).
+ We chatted about how CI/CD might work for data scientists, who often begin a
+ project with a phase of rapid exploration, and what version control for ML
+ could look like without Git.
+
+- **Smashing the data monolith.** Engineer Juan López López wrote a blog called
+ ["A complete guide about how to break the data monolith"](https://medium.com/packlinkeng/a-complete-guide-about-how-to-break-the-data-monolith-caa2ab2d01f6),
+ which is a neat manifesto about treating infrastructure _and_ data as code.
+ It's got nice coverage of DVC, code examples, and some deeply enjoyable
+ artwork.
+
+![](/static/uploads/images/2020-04-06/monolith.jpeg)_From Juan Juan López
+López's
+[blog](https://medium.com/packlinkeng/a-complete-guide-about-how-to-break-the-data-monolith-caa2ab2d01f6)._
+
+Thanks for reading. As always, let us know what you're making with DVC and what
+links are catching your interest in the blog comments, on
+[Twitter](https://twitter.com/DVCorg), and our
+[Discord channel](https://dvc.org/chat). Be safe and be in touch!
diff --git a/content/docs/command-reference/run.md b/content/docs/command-reference/run.md
index 5d62017896..e4371f1f52 100644
--- a/content/docs/command-reference/run.md
+++ b/content/docs/command-reference/run.md
@@ -9,7 +9,7 @@ command and execute the command.
usage: dvc run [-h] [-q | -v] [-d ] [-o ] [-O ]
[-p ] [-m ] [-M ] [-f ]
[-w ] [--no-exec] [-y] [--overwrite-dvcfile]
- [--ignore-build-cache] [--remove-outs] [--no-commit]
+ [--ignore-build-cache] [--no-commit]
[--outs-persist ] [--outs-persist-no-cache ]
[--always-changed]
command
@@ -167,10 +167,6 @@ data pipeline (e.g. random numbers, time functions, hardware dependency, etc.)
command's code is non-deterministic (meaning it produces different outputs
from the same list of inputs).
-- `--remove-outs` (_deprecated_) - remove stage outputs before executing the
- `command`. If `--no-exec` specified outputs are removed anyway. See
- `dvc remove` as well for more details. **This is the default behavior.**
-
- `--no-commit` - do not save outputs to cache. A DVC-file is created and an
entry is added to `.dvc/state`, while nothing is added to the cache.
(`dvc status` will report that the file is `not in cache`.) Use `dvc commit`
diff --git a/content/docs/sidebar.json b/content/docs/sidebar.json
index 7611a80125..e527b38dec 100644
--- a/content/docs/sidebar.json
+++ b/content/docs/sidebar.json
@@ -153,6 +153,10 @@
{
"label": "Docs and Website",
"slug": "docs"
+ },
+ {
+ "label": "Writing Blog Posts",
+ "slug": "blog"
}
]
},
diff --git a/content/docs/understanding-dvc/resources.md b/content/docs/understanding-dvc/resources.md
index d9ba0a587f..4c1b487326 100644
--- a/content/docs/understanding-dvc/resources.md
+++ b/content/docs/understanding-dvc/resources.md
@@ -41,4 +41,4 @@
## Slides
-- [From ML experiments to production: Versioning and Reproducibility with MLV-too](https://peopledoc.github.io/mlv-tools-tutorial/talks/pyData/presentation.html#/)
+- [From ML experiments to production: Versioning and Reproducibility with MLV-too](https://peopledoc.github.io/mlvtools-tutorial/talks/pyData/presentation.html#/)
diff --git a/content/docs/use-cases/data-registries.md b/content/docs/use-cases/data-registries.md
index 8ef1f1662d..ed0f5e2216 100644
--- a/content/docs/use-cases/data-registries.md
+++ b/content/docs/use-cases/data-registries.md
@@ -80,7 +80,7 @@ The actual data is stored in the project's cache and should be
[remote storage](/doc/command-reference/remote) locations, so the registry can
be accessed from other locations or by other people:
-```
+```dvc
$ dvc remote add -d myremote s3://bucket/path
$ dvc push
```
diff --git a/content/docs/user-guide/contributing/blog.md b/content/docs/user-guide/contributing/blog.md
new file mode 100644
index 0000000000..826de824be
--- /dev/null
+++ b/content/docs/user-guide/contributing/blog.md
@@ -0,0 +1,145 @@
+# Writing Blog Posts
+
+To create a new post, you need to create a PR to the DVC website
+[project](https://github.com/iterative/dvc.org).
+
+## Prepare your environment
+
+Set up the
+[Development environment](/doc/user-guide/contributing/docs#development-environment)
+to see how your content will look like after you publish it. In the
+`yarn develop` mode you will be able to run the website locally, and it'll be
+updating content in your browser as you edit the post.
+
+## Add a post
+
+Create a Markdown file in the `content/blog` folder. File name must follow the
+pattern: `YYYY-MM-DD-my-new-blog-post.md`. After merging this file into the
+`master` branch, blog post will be published at `blog/my-new-blog-post` address
+automatically.
+
+Write front matter in the following format:
+
+```yml
+---
+title: Hello World
+date: 2015-05-01
+description: Hello World
+descriptionLong: |
+ Some long
+ multiline
+ text (supports _basic_ [Markdown](link))
+picture: /uploads/image.jpeg
+pictureComment: Some _Comment_ (supports _basic_ [Markdown](link))
+author: ../authors/author_name.md
+tags:
+ - Open Source
+ - Machine Learning
+ - Data Science
+ - Version Control
+ - AI
+---
+
+```
+
+- `title` - **Required.** Title of the post.
+- `date` - **Required.** Publication date in the `YYYY-MM-DD` format. Will be
+ used to sort posts and in RSS.
+- `description` - **Required.** Short description to show in the feed.
+- `descriptionLong` - Optional long description to show before the image on the
+ post page. If not set, `description` will be used instead. Supports basic
+ Markdown markup.
+- `picture` - Optional cover image.
+- `pictureComment` - Optional cover image comment. Supports basic Markdown
+ markup.
+- `author` - **Required.** Relative path to `.md` file with information about
+ the author. See
+ [Adding authors](/doc/user-guide/contributing/blog#adding-authors) to add a
+ new author.
+- `commentsUrl` - Optional link to the [DVC forum](https://discuss.dvc.org)
+ topic. It will contain comments for the post.
+- `tags` - Optional list of tags.
+
+## Content guidelines
+
+It's recommended to follow all the relevant recommendations from the
+[Doc style guidelines](/doc/user-guide/contributing/docs#doc-style-guidelines-javascript-and-markdown).
+
+### Adding images
+
+> 🙏 Please, be sensible about image size you are about to commit, run some
+> online image optimizer. Huge images pollute Git index, slow down `git clone`,
+> deployment, and other operations with the repository.
+
+The original image should be 2x height and width of the one you want to see on
+the screen to look sharp. To add images, put them into `static/uploads` and
+reference like this:
+
+```md
+![](/uploads/images/2020-02-10/image.png)
+```
+
+To add a subtitle:
+
+```md
+![](/uploads/images/2020-02-10/image.png)_subtitle [with a link](link)_
+```
+
+To set the image size and text wrap:
+
+```md
+![](/uploads/images/2020-02-10/image.png '=500')
+![](/uploads/images/2020-02-10/image.png '=500 Some Title')
+![](/uploads/images/2020-02-10/image.png 'Some Title =500')
+![](/uploads/images/2020-02-10/image.png 'Some Title :wrap-left =500')
+![](/uploads/images/2020-02-10/image.png ':wrap-left =500 Some Title')
+```
+
+### Embedding links
+
+Any URLs
+[supported by `gatsby-remark-embedder`](https://github.com/MichaelDeBoey/gatsby-remark-embedder#supported-services)
+such as Youtube and Twitter share links will be embedded automatically. You just
+need to paste them in the post Markdown, for example:
+
+```md
+... Check out this great video right here:
+
+https://youtu.be/4h6I9_xeYA4
+
+And now lets move onto ...
+```
+
+You can ember a preview of any other website using `` tag:
+
+```md
+... Check out this great project:
+
+
+
+And now lets move onto ...
+```
+
+## Adding authors
+
+Create `.md` file in the `content/authors` folder.
+
+Write front matter in the following format:
+
+```yml
+path: ../authors/relative_path_to_file.md
+name: Author's Name
+avatar: /uploads/avatar.jpeg
+```
+
+- `path` - **Required.** String that the CMS will insert to the author field in
+ the blog post. Should be equal to the path from the blog post to the author's
+ `.md` file.
+- `name` – **Required.** Author's name.
+- `avatar` - **Required.** Relative path to the author's avatar (1024x1024 is
+ recommended).
diff --git a/content/docs/user-guide/contributing/docs.md b/content/docs/user-guide/contributing/docs.md
index 64f52e30e6..adee343d3c 100644
--- a/content/docs/user-guide/contributing/docs.md
+++ b/content/docs/user-guide/contributing/docs.md
@@ -5,19 +5,24 @@ We welcome any contributions to our documentation repository,
the documentation content, or (rare) changes to the JS engine we use to run the
website.
+Please see our
+[Writing a Blog Post guide](https://dvc.org/doc/user-guide/contributing/blog)
+for more details on how to write and submit a new blog post.
+
## Structure of the project
To contribute documentation, these are the relevant locations:
- [Content](https://github.com/iterative/dvc.org/tree/master/content/docs)
- (`docs/`): [Markdown](https://guides.github.com/features/mastering-markdown/)
- files of the different pages to render dynamically in the browser.
+ (`content/docs/`):
+ [Markdown](https://guides.github.com/features/mastering-markdown/) files. One
+ file - one page of the documentation.
- [Images](https://github.com/iterative/dvc.org/tree/master/static/img)
- (`img/`): Add new images (png, svg, etc.) here. Use them in Markdown files
- like this: `![](/img/.gif)`.
+ (`static/img/`): Add new images (`.png`, `.svg`, etc.) here. Use them in
+ Markdown files like this: `![](/img/.gif)`.
- [Navigation](https://github.com/iterative/dvc.org/tree/master/content/docs/sidebar.json)
- (`docs/sidebar.json`): Edit it to add or change entries in the navigation
- sidebar.
+ (`content/docs/sidebar.json`): Edit it to add or change entries in the
+ navigation sidebar.
Merging the appropriate changes to these files into the master branch is enough
to update the docs and redeploy the website.
@@ -48,22 +53,13 @@ We will review your PR as soon as possible. Thank you for contributing!
## Development environment
-We highly recommend running this web app locally to check documentation changes
-before submitting them, and it's quite necessary when making changes to the
-[Next.js](https://nextjs.org/) engine itself (rare). Source code files need to
-be properly formatted as well, which is also ensured by the full setup below.
-
-Get the latest development version by
-[forking](https://help.github.com/en/articles/fork-a-repo) and cloning the
-repository from GitHub:
-
-```dvc
-$ git clone git@github.com:/dvc.org.git
-$ cd dvc.org
-```
+We highly recommend running this web app locally to check documentation or blog
+changes before submitting them, and it's quite necessary when making changes to
+the website engine itself. Source code and content files need to be properly
+formatted and linted as well, which is also ensured by the full setup below.
-Make sure you have a recent version of [Node.js](https://nodejs.org/en/)
-(`^12.0.0`), and install [Yarn](https://yarnpkg.com/):
+Make sure you have a recent LTS version of [Node.js](https://nodejs.org/en/)
+(`>=12.0.0`), and install [Yarn](https://yarnpkg.com/):
```dvc
$ npm install -g yarn
@@ -81,36 +77,65 @@ Launch the server locally with:
$ yarn develop
```
-This will start the server on the default port, `3000`. Visit
-`http://localhost:3000/` and navigate to the docs in question. This will also
-enable the Git pre-commit hook that will be formatting your code and
+This will start the server on the default port, `8000`. Visit
+`http://localhost:8000/` and navigate to the page in question. This will also
+enable the Git pre-commit hook that will be formatting and linting your code and
documentation files automatically.
-### Debugging
+### All commands
+
+Please, check the project's `package.json` file to see the complete list. For
+the tools we provide wrappers for your convenience, you can always call them
+directly (e.g. `yarn eslint ` or `yarn prettier --check `).
+
+> All the style, linter, test checks below will be enforced automatically upon
+> [submitting PRs](#submitting-changes).
+
+To build the project and run it:
+
+- `yarn develop` - run development server with hot reload.
+- `yarn build` - build assets in the `public` directory.
+- `yarn start` - run production static server over the `public` directory.
+
+If you change source code files, run tests:
+
+- `yarn test` - run tests.
+
+We use [Prettier](https://prettier.io/) to format our source code, below is a
+set of wrapper commands for your convenience:
+
+- `yarn format-check` - check all source and content files that they are
+ properly formatted. This command does not fix any found issue, only reports
+ them.
+- `yarn format-all` - fix all found problems.
+- `yarn format-staged` - same, but only on staged files.
+- `yarn format ` - run this command `yarn format ` to format a
+ specific file.
+
+We use linters (e.g. [ESLint](https://eslint.org/)) to check source code style
+and detect different errors:
+
+- `yarn lint-ts` - lint source code files (`.ts`, `.js`, `tsx`, etc).
+- `yarn lint-css` - lint `.css` files.
+
+Other checks:
+
+- `yarn link-check` - runs script to detect broken URLs (e.g. those that return
+ 404 - Not Found) in the content.
-The `yarn debug` script runs the local development server with `node`'s
-[`--inspect-brk` option](https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options)
-in order for debuggers to connect to it (on the default port, 9229).
+### ENV variables
-> For example, use this launch configuration in **Visual Studio Code**:
->
-> ```json
-> {
-> "type": "node",
-> "request": "launch",
-> "name": "Launch via Yarn",
-> "runtimeExecutable": "yarn",
-> "runtimeArgs": ["debug"],
-> "port": 9229
-> }
-> ```
+Some environment variables are required to deploy this project to production,
+others can be used to debug the project. Please check the production system
+settings to see all the variables that production and deployment system depend
+on.
-### Running tests
+Some available variables:
-If you intend to change JavaScript (Node) files, test the changes with
-`yarn test` command before committing them. For code formatting and styling, try
-`yarn format-staged` and `yarn lint`. (All of these checks will be enforced
-automatically upon [submitting PRs](#submitting-changes).)
+- `GA_ID` – ID of the Google Analytics counter.
+- `ANALYZE` - boolean property to run
+ [webpack-analyzer](https://www.gatsbyjs.org/packages/gatsby-plugin-webpack-bundle-analyzer/).
+- `SENTRY_DSN` - [Sentry](https://sentry.io/) URL for errors tracking.
## Doc style guidelines (JavaScript and Markdown)
@@ -130,8 +155,8 @@ pre-commit hook that is integrated when `yarn` installs the project dependencies
[its configuration](https://github.com/iterative/dvc.org/blob/master/.prettierrc)).
The formatting of staged files will automatically be done by a Git pre-commit
hook. You may also run `yarn format ` (format specific file/pattern),
- `yarn format-staged` (all staged files), or `yarn format-all` (all .md, .js
- files) before committing changes if needed.
+ `yarn format-staged` (all staged files), or `yarn format-all` (all `.md`,
+ `.js` and other source files) before committing changes if needed.
([Advanced usage](https://prettier.io/docs/en/cli.html) of Prettier is
available through `yarn prettier ...`)
diff --git a/gatsby-config.js b/gatsby-config.js
index 192d7e173d..ba1afd1a40 100644
--- a/gatsby-config.js
+++ b/gatsby-config.js
@@ -124,7 +124,7 @@ const plugins = [
feeds: [
{
description,
- output: '/rss.xml',
+ output: '/blog/rss.xml',
query: `
{
allMarkdownRemark(
@@ -153,7 +153,7 @@ const plugins = [
/* eslint-disable-next-line @typescript-eslint/camelcase */
custom_elements: [{ 'content:encoded': edge.node.html }],
date: edge.node.frontmatter.date,
- description: edge.node.description,
+ description: edge.node.frontmatter.description,
guid: site.siteMetadata.siteUrl + edge.node.fields.slug,
url: site.siteMetadata.siteUrl + edge.node.fields.slug
})
diff --git a/gatsby-ssr.js b/gatsby-ssr.js
index 78f5804cc5..8b0fea8d96 100644
--- a/gatsby-ssr.js
+++ b/gatsby-ssr.js
@@ -1,7 +1,5 @@
/* eslint-env node */
-const React = require('react')
-
const PageWrapper = require('./src/components/PageWrapper').default
exports.wrapPageElement = PageWrapper
diff --git a/package.json b/package.json
index d10c5174f4..2757ca60cb 100644
--- a/package.json
+++ b/package.json
@@ -6,13 +6,14 @@
"scripts": {
"develop": "gatsby develop",
"build": "gatsby build",
+ "start": "./scripts/clear-cloudflare-cache.js; node ./src/server/index.js",
"heroku-postbuild": "./scripts/deploy-with-s3.js",
"test": "jest",
- "start": "./scripts/clear-cloudflare-cache.js; node ./src/server/index.js",
"format-staged": "pretty-quick --staged --no-restage --bail",
- "format-check": "prettier --check '{.,content/docs/**,src/**}/*.{js,md,json}'",
- "format-all": "prettier --write './**/*.{js,jsx,md,tsx,ts,json}'",
- "lint-ts": "tsc --noEmit --skipLibCheck && eslint --ext .json,.js,.ts,.tsx src scripts",
+ "format-check": "prettier --check '**/*.{js,jsx,md,tsx,ts,json}'",
+ "format-all": "prettier --write '**/*.{js,jsx,md,tsx,ts,json}'",
+ "format": "prettier --write",
+ "lint-ts": "tsc --noEmit --skipLibCheck && eslint --ext .json,.js,.ts,.tsx .",
"lint-css": "stylelint \"src/**/*.css\"",
"link-check": "./scripts/link-check-git-all.sh",
"link-check-diff": "./scripts/link-check-git-diff.sh"
@@ -153,8 +154,8 @@
}
},
"lint-staged": {
- "*.{js,ts,tsx}": [
- "yarn lint-ts"
+ "*.{js,ts,tsx,json}": [
+ "eslint"
],
"*.css": [
"yarn stylelint --fix"
diff --git a/src/components/Link/index.tsx b/src/components/Link/index.tsx
index 68ac003db1..cdac8f7156 100644
--- a/src/components/Link/index.tsx
+++ b/src/components/Link/index.tsx
@@ -2,7 +2,7 @@ import React, { useCallback } from 'react'
import { URL } from 'iso-url'
import { useLocation } from '@reach/router'
import GatsbyLink from 'gatsby-link'
-import { getRedirect, handleFrontRedirect } from '../../utils/shared/redirects'
+import { getRedirect } from '../../utils/shared/redirects'
import { scrollIntoLayout, getScrollNode } from '../../utils/front/scroll'
export type ILinkProps = {
@@ -76,9 +76,6 @@ const Link: React.FC = ({ href, ...restProps }) => {
getScrollNode().scrollTop = 0
}
}
-
- // Handle front redirects
- handleFrontRedirect(location.host, location.pathname, e)
},
[restProps.onClick, currentLocation]
)
@@ -89,12 +86,15 @@ const Link: React.FC = ({ href, ...restProps }) => {
href = currentLocation.pathname + href
}
- // Replace link href with redirect if it exists
- const [, redirectUrl] = getRedirect(location.host, location.pathname)
- if (redirectUrl) {
- href = isRelative(redirectUrl)
- ? redirectUrl + currentLocation.search
- : redirectUrl
+ if (location.host === currentLocation.host) {
+ // Replace link href with redirect if it exists
+ const [, redirectUrl] = getRedirect(location.host, location.pathname)
+
+ if (redirectUrl) {
+ href = isRelative(redirectUrl)
+ ? redirectUrl + currentLocation.search
+ : redirectUrl
+ }
}
return
diff --git a/static/uploads/images/2020-04-06/april_header.png b/static/uploads/images/2020-04-06/april_header.png
new file mode 100644
index 0000000000..ff2921472a
Binary files /dev/null and b/static/uploads/images/2020-04-06/april_header.png differ
diff --git a/static/uploads/images/2020-04-06/data_stream.png b/static/uploads/images/2020-04-06/data_stream.png
new file mode 100644
index 0000000000..4746ac9c08
Binary files /dev/null and b/static/uploads/images/2020-04-06/data_stream.png differ
diff --git a/static/uploads/images/2020-04-06/laptop_on_boat.jpeg b/static/uploads/images/2020-04-06/laptop_on_boat.jpeg
new file mode 100644
index 0000000000..bbe10c6388
Binary files /dev/null and b/static/uploads/images/2020-04-06/laptop_on_boat.jpeg differ
diff --git a/static/uploads/images/2020-04-06/marcel.jpeg b/static/uploads/images/2020-04-06/marcel.jpeg
new file mode 100644
index 0000000000..3ec2428ba2
Binary files /dev/null and b/static/uploads/images/2020-04-06/marcel.jpeg differ
diff --git a/static/uploads/images/2020-04-06/monolith.jpeg b/static/uploads/images/2020-04-06/monolith.jpeg
new file mode 100644
index 0000000000..c8a3f0cf18
Binary files /dev/null and b/static/uploads/images/2020-04-06/monolith.jpeg differ
diff --git a/static/uploads/images/2020-04-06/oreilly.jpeg b/static/uploads/images/2020-04-06/oreilly.jpeg
new file mode 100644
index 0000000000..c257037309
Binary files /dev/null and b/static/uploads/images/2020-04-06/oreilly.jpeg differ