Skip to content

revert: Access data files from source folder (#1969)#5325

Merged
stevenjoezhang merged 1 commit intov7.0.0from
data
Oct 23, 2023
Merged

revert: Access data files from source folder (#1969)#5325
stevenjoezhang merged 1 commit intov7.0.0from
data

Conversation

@stevenjoezhang
Copy link
Member

@stevenjoezhang stevenjoezhang commented Oct 22, 2023

What does it do?

reverts #1969
fixes #5260

Motivation for the modification: I suspect that this feature is rarely used (I noticed it for the first time today). In fact, users can access the 'site' variable through the template engine, without the need for tags within the article.

Screenshots

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@github-actions
Copy link

How to test

git clone -b data https://github.com/hexojs/hexo.git
cd hexo
npm install
npm test

@coveralls
Copy link

Coverage Status

coverage: 99.529% (-0.001%) from 99.53% when pulling 74b514b on data into 3059fa0 on v7.0.0.

@stevenjoezhang stevenjoezhang linked an issue Oct 22, 2023 that may be closed by this pull request
5 tasks
@D-Sketon
Copy link
Member

breaking change?
maybe adding a parameter to control this behavior is a better choice?

@stevenjoezhang
Copy link
Member Author

Yes, it is a breaking change, we could include it in the v7.0.0 release. However, I don't think it's necessary to add a new option. This usage is not mentioned in Hexo's documentation; it's a completely undocumented interface. We don't need to consider its stability and compatibility.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

duplicates of site.data in db.json leads to large size

4 participants