Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

How to get at one piece of data... #66

Open
arretx opened this issue Sep 6, 2018 · 0 comments
Open

How to get at one piece of data... #66

arretx opened this issue Sep 6, 2018 · 0 comments

Comments

@arretx
Copy link
Contributor

arretx commented Sep 6, 2018

The following:

{% assign page_list = site.pages %}

{{page_list[0]}}

Results in showing me the first page in my list of pages. In the key/value pairs that result, there is one that has the information I need, but it's buried in @to_liquid= at the end.

If I want to sort the pages by date, I get an error when I add the sort filter to the assign. How can I get "last_modified_at"=>2018-07-07 09:42:44 -0700 to be the key/value pair instead of all of that other stuff?

“last_modified_at”=>#<Jekyll::LastModifiedAt::Determinator:0x00000002a25858 @site_source=”/var/www/newvalleyresources”, @page_path=”404.md”, @opts={}, @article_file_path=”/var/www/newvalleyresources/404.md”, @is_git_repo=true, @top_level_git_directory=”/var/www/newvalleyresources/.git”, @relative_path_from_git_dir=”404.md”, @to_liquid=2018-07-07 09:41:44 -0700>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant