Skip to content
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

Ignore README.md in git submodule #682

Open
msutherl opened this issue May 15, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@msutherl
Copy link

commented May 15, 2019

Environment

Zola version: 0.5.1

Problem

We have a submodule in our content directory, which has its own README, so:

zola/
  content/
    submodule/
      README.md
      _index.md

The README.md file does not, and should not, have TOML front-matter, so zola build fails. Adding README.md to ignored_content in the config does nothing, because zola attempts to parse the file before potentially ignoring it.

Proposed Solution

There should be a way to ignore markdown files with an .md extension that don't have TOML front-matter.

A hack that works for now is to name README to README.markdown, so Github sees it as a markdown file, but zola ignores it.

@Keats

This comment has been minimized.

Copy link
Collaborator

commented May 22, 2019

ignored_content (I assume it was what you meant by ignored_files).
Looking at the docs, it should work with .md file but since it was originally meant for assets never implemented.

It should be an easy fix though, it just needs to filter any matching pages (not sections) in Site::load before creating a Page to see if it's a match. It also needs to handle it in the rebuild.

@msutherl

This comment has been minimized.

Copy link
Author

commented May 28, 2019

Thanks @Keats!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.