Skip to content

Conversation

@alroniks
Copy link
Collaborator

What does it do ?

It allows excluding content field during extracting.

Why is it needed ?

Before content field always was extracting to file, but sometimes user don't wont to export content, only meta info and in this case it will be useful.

Related issue(s)/PR(s)

#195

@zaigham
Copy link

zaigham commented Jul 17, 2016

I tried by copying the single file from the PR and added the config in .gitify like this:

    templates:
        class: modTemplate
        primary: templatename
        extension: .html
        exclude_keys:
          - content

    chunks:
        class: modChunk
        primary: name
        extension: .html
        exclude_keys:
          - content

    snippets:
        class: modSnippet
        primary: name
        extension: .php
        exclude_keys:
          - content

    plugins:
        class: modPlugin
        primary: name
        extension: .php
        exclude_keys:
          - content

But when I extract elements, it still outputs the static file contents into .html files. Am I missing some step?

Thanks.

@alroniks
Copy link
Collaborator Author

@zaigham Are you sure that you replace the correct file? Because I had the same issue when fixed file, but run gitify by symlink from another place. For me is works as expected, but pay attention, that not all elements store content in the content field.

@zaigham
Copy link

zaigham commented Nov 11, 2016

Revisiting this again now, I have cloned the repo and checked out the branch: https://github.com/modmore/Gitify/tree/I-195_skip_content_field

But I still get the contents of static chunks.

Following is in .gitify file:

data:
    chunks:
        class: modChunk
        primary: name
        extension: .tpl
        exclude_keys:
          - snippet

snippet is used because its the name or column which has the contents.

Kindly assist where I am doing wrong?

Thanks,

@Mark-H
Copy link
Member

Mark-H commented Nov 11, 2016

Maybe you need to exclude both snippet and content? The check that extracts the content looks for the content key (which is an alias in the model, I think), while the actual field is snippet as you've found.

@zaigham
Copy link

zaigham commented Nov 13, 2016

@Mark-H Where do I look for these Keys and Aliases?

Update: It seems the following works:

data:
    chunks:
        class: modChunk
        primary: name
        extension: .tpl
        exclude_keys:
          - snippet
          - content

But it doesn't make sense? .. maybe shed some light for laymen like me? 😃

@Mark-H Mark-H merged commit b2e32d7 into master Jan 22, 2019
@Mark-H Mark-H deleted the I-195_skip_content_field branch January 22, 2019 23:10
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.

4 participants