Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Fail to get permalink when generating og:url with it #193

Description

@zacky1972

I wrote the following _layout.slime to generate OGP meta data:

doctype html
html
  head
    title TITLE
    meta charset="UTF-8"
    meta name="viewport" content="width=device-width, initial-scale=1.0"
    = link_to_css @env, "css/theme.css", media: "all"
    meta name="twitter:card" content="summary"
    meta property="og:url" content=@permalink
    meta property="og:title" content=@title
    meta property="og:description" content=@description
    meta property="og:image" content=@image
  body
    = @children

I guess @permalink will generate the permalink of the page, but I got the following warning:

warning: assign @permalink not available in EEx template. Please ensure all assigns are given as options. Available assigns: [:env, :description, :extension, :title, :image, :children, :input_file, :output_file, :dependency_chain, :preprocessor]
  (eex 1.14.4) lib/eex/engine.ex:140: EEx.Engine.fetch_assign!/2
  deps/still/lib/still/preprocessor/slime/renderer.ex:13: R41744.Still.Preprocessor.Slime.Layout.render/0
  (still 0.8.0) lib/still/preprocessor/slime.ex:22: Still.Preprocessor.Slime.render/1
  (still 0.8.0) lib/still/preprocessor/slime.ex:12: Still.Preprocessor.Slime.run/2
  (elixir 1.14.4) lib/enum.ex:4249: Enum.flat_map_list/2
  (still 0.8.0) lib/still/preprocessor/pagination.ex:29: Still.Preprocessor.Pagination.run/2

How should I do?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions