Skip to content

Added opengraphs option for open graph tags on docs #305

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

Merged
merged 1 commit into from
Aug 16, 2018

Conversation

Ephemera
Copy link
Contributor

@Ephemera Ephemera commented Aug 15, 2018

Usage:

[targets.docs]
title = "Nirum Examples"

  [[targets.docs.opengraphs]]
  tag = "og:url"
  content = "https://nirum.org"

  [[targets.docs.opengraphs]]
  tag = "og:title"
  content = "Nirum Examples"

Closes: #283

@Ephemera Ephemera force-pushed the add-opengraph-metadata branch from ad8b74a to fc76966 Compare August 15, 2018 05:49
@kanghyojun kanghyojun assigned kanghyojun and Ephemera and unassigned kanghyojun Aug 15, 2018
@Ephemera Ephemera force-pushed the add-opengraph-metadata branch from fc76966 to 197fc76 Compare August 15, 2018 06:07
@codecov
Copy link

codecov bot commented Aug 15, 2018

Codecov Report

Merging #305 into master will decrease coverage by 0.21%.
The diff coverage is 31.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #305      +/-   ##
==========================================
- Coverage   76.41%   76.19%   -0.22%     
==========================================
  Files          34       34              
  Lines        2883     2899      +16     
  Branches      192      194       +2     
==========================================
+ Hits         2203     2209       +6     
- Misses        488      496       +8     
- Partials      192      194       +2
Impacted Files Coverage Δ
src/Nirum/Package/Metadata.hs 81.11% <ø> (+0.69%) ⬆️
src/Nirum/Targets/Docs.hs 47.31% <31.25%> (-1.52%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9fe340d...35dca72. Read the comment docs.

@Ephemera Ephemera force-pushed the add-opengraph-metadata branch from 197fc76 to 08d4eb7 Compare August 15, 2018 06:08
kanghyojun
kanghyojun previously approved these changes Aug 15, 2018
dahlia
dahlia previously approved these changes Aug 15, 2018
@Ephemera Ephemera dismissed stale reviews from dahlia and kanghyojun via a0b5e5f August 15, 2018 06:25
@Ephemera Ephemera force-pushed the add-opengraph-metadata branch from 08d4eb7 to a0b5e5f Compare August 15, 2018 06:25
kanghyojun
kanghyojun previously approved these changes Aug 15, 2018
Copy link
Member

@dahlia dahlia left a comment

Choose a reason for hiding this comment

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

Build fails:

app/nirum-docs.hs:32:39: warning: [-Wmissing-fields]
    • Fields of ‘Docs’ not initialised: docsOpenGraph
    • In the ‘target’ field of a record
      In the expression:
        Metadata
          {version = Nirum.Version.version,
           description = Just
                           "IDL compiler and RPC/distributed object framework for microservices",
           license = Just "GPL-3",
           keywords = ["IDL", "microservices", "SOA", ....],
           authors = [Author "Nirum team" Nothing Nothing],
           Nirum.Package.Metadata.target = Docs
                                             {docsTitle = "Nirum", docsStyle = style,
                                              docsHeader = "", docsFooter = footer}}
      In an equation for ‘packageMetadata’:
          packageMetadata
            = Metadata
                {version = Nirum.Version.version,
                 description = Just
                                 "IDL compiler and RPC/distributed object framework for microservices",
                 license = Just "GPL-3", keywords = ["IDL", "microservices", ....],
                 authors = [Author "Nirum team" Nothing Nothing],
                 Nirum.Package.Metadata.target = Docs
                                                   {docsTitle = "Nirum", docsStyle = style,
                                                    docsHeader = "", docsFooter = footer}}
   |
32 |     , Nirum.Package.Metadata.target = Docs
   |                                       ^^^^...
nirum-docs.hs: app/nirum-docs.hs:(32,39)-(37,9): Missing field in record construction docsOpenGraph

CHANGES.md Outdated
[#300]: https://github.com/nirum-lang/nirum/pull/300
[CommonMark]: http://commonmark.org/
[table syntax extension]: https://github.github.com/gfm/#tables-extension-
[special attributes extension]: https://michelf.ca/projects/php-markdown/extra/#spe-attr
[OpenGraph]: http://ogp.me
Copy link
Member

Choose a reason for hiding this comment

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

Could you append a trailing slash to the url?

CHANGES.md Outdated
@@ -24,6 +24,7 @@ To be released.
to customize the look and feel of the result pages.
- Fixed an incorrect processing of [CommonMark] thight list items: it had
crashed when a thight list item contains blocks other than paragraphs.
- Added `opengraphs` option for [OpenGraph] objects on docs. [[#283] by GyuYong Jung]
Copy link
Member

Choose a reason for hiding this comment

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

Docs about this new option should be added to docs/target/docs.md file.

kanghyojun
kanghyojun previously approved these changes Aug 15, 2018
@Ephemera Ephemera force-pushed the add-opengraph-metadata branch from f6ab14c to 35dca72 Compare August 15, 2018 08:19
@dahlia dahlia merged commit 35dca72 into nirum-lang:master Aug 16, 2018
dahlia added a commit that referenced this pull request Aug 16, 2018
Added `opengraphs` option for open graph tags on docs
@Ephemera Ephemera deleted the add-opengraph-metadata branch August 17, 2018 00:51
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.

3 participants