Commit Graph

7 Commits

Author SHA1 Message Date
Justin DiRose 2835500c62
FEATURE: Make Docs compatible with inline oneboxes (#33)
Linking directly to a Docs item like so `http://localhost:3000/docs?topic=16` would result in a generic inline onebox link. This adds logic to the Rails view so a proper title is rendered when the `InlineOneboxer` in core queries the route.
2021-02-16 15:09:45 -06:00
Justin DiRose f32aebdba0
FEATURE: Rename from Knowledge Explorer to Docs (#27)
After internal discussion, the team decided to rename this plugin to `discourse-docs`. No substantial changes made here aside from a settings migration.
2021-01-18 10:38:09 -06:00
Justin DiRose abb9047d29
FIX: Ignore canonical URL on /docs
When trying to onebox topics, the canonical URL overrides the generated
OpenGraph tags, causing a less than ideal onebox for a linked KE
article.

This commit uses the existing options for the `crawlable_meta_data`
method to generate the `og:ignore_canonical` tag.

1504fe7231/app/helpers/application_helper.rb (L267-L269)
2020-10-06 11:22:18 -05:00
Justin DiRose 310f2f142c
FIX: Handle encoding on onebox excerpt
Oneboxes were breaking with bad encoding using the out of the box
excerpt on the topic. Mimicked core behaviors instead.
2020-10-05 16:17:38 -05:00
Justin DiRose 7849f8943c
FIX: 406 Error on Reload
Logic was not properly checking if there was a topic selected or not. As a result, the template for onebox data was still being loaded, causing an error. Also changed the order around TopicView to avoid unwanted effects.
2020-10-01 13:24:28 -05:00
Justin DiRose 0e1c7c7216
FEATURE: Add onebox metadata (#10)
Currently linking directly to Knowledge Explorer topics shows a generic onebox, which isn't super helpful in some cases.

This commit mimics how the theme creator plugin handles adding metadata to special occurrences. However, to get this to work, how the plugin handles showing topic contents needed to be refactored. Instead of hitting the existing topic route, the plugin implements its own version of this, including adding restrictions for topics that are not in a selected Knowledge Explorer category or tag.
2020-10-01 09:32:28 -05:00
Justin DiRose 578773f3c0 FEATURE: Disallow crawling of /knowledge-explorer/ via robots.txt 2019-06-28 15:05:27 -05:00