* Implement Reddit liquid tag * Set reddit content in locals * Change Reddit liquid tag content layout I decided a UI similar to the Stack Exchange tag would be better. Now the Reddit tag looks a bit similar. * Add tests for RedditTag * Add reddit liquid tag example to docs Also emphasize notice about compilation of article when using any liquid tag * Parse markdown text reddit content for RedditTag * Display date RedditTag post was published * Remove file location comments * Change order of conditional for Reddit liquid tag Sometimes the attribute `post_hint` might be null and neither condition would apply. * Add example to use Reddit liquid tag * Change reddit svg icon for Reddit liquid tag * handle and verify status of Reddit links Here we make sure the passed link is a valid one in terms of URI composition (e.g. protocol) but also that the URL is one that points to existing content in Reddit. If the URL isn't returning anything but a successful response code (200) then we treat it as an invalid one. * Do not use VCR for RedditTag specs The generated cassette for this tag was really huge (6000+ lines). Using mocks (as in the MediumTag spec) still does the job and without that huge VCR file. * Remove index line from schema.db * Improve RedditJsonFromUrlService - Change User-Agent in requests to one read from app configuration - Remove Reddit URL check by making a GET request - Add regexp to validate URL looks like a Reddit URL * Move RedditJsonFromUrlService methods to RedditTag Also changed the way the request was being mocked. Previously, it was by mocking the service class now I'm mocking HTTParty directly and returning the JSON structure Reddit uses. |
||
|---|---|---|
| .. | ||
| .static | ||
| backend | ||
| design | ||
| frontend | ||
| getting-started | ||
| installation | ||
| internal | ||
| maintainers | ||
| technical-overview | ||
| tests | ||
| .gitdocs.json | ||
| .nvmrc | ||
| .ruby-version | ||
| api_template.hbs | ||
| api_v0.yml | ||
| contributing.md | ||
| contributing_api.md | ||
| deployment.md | ||
| faqs.md | ||
| Gemfile | ||
| licensing.md | ||
| Makefile | ||
| netlify.toml | ||
| readme.md | ||
| self-hosting.md | ||
| troubleshooting.md | ||
| items | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Welcome to DEV's developer documentation
On this site you'll find instructions to setup a local instance of DEV, documentation on the architecture of DEV, how to contribute, and many other useful documents.
This documentation site is the product of a number of volunteer contributors working alongside the DEV Core Team, special thanks to all those who have contributed to the documentation.
Running the documentation locally
Like DEV, this site is open source and the code is hosted on GitHub. If you find any incorrect information, or a even a typo, we'd love to see a pull request. Follow these steps to get the documentation site running locally.
DEV's documentation is built with GitDocs NodeJS library.
The first step to running the documentations locally is to install the GitDocs
package globally.
With npm:
npm install gitdocs -g
Alternatively, you can use Yarn:
yarn global add gitdocs
Once installed, you should run gitdocs serve from the root of the dev.to
project or from the /docs directory.
gitdocs serve
This will start a server where you can browse the documentation: http://localhost:8000/
If you add new pages or rename existing pages, you'll need to restart the server for those changes to take effect.
Contributing to the docs
If you're looking for more information on contributing, check out the Contributing article.