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

Extensionless files #742

Closed
sethvargo opened this issue Jan 20, 2013 · 7 comments
Closed

Extensionless files #742

sethvargo opened this issue Jan 20, 2013 · 7 comments

Comments

@sethvargo
Copy link
Contributor

@sethvargo sethvargo commented Jan 20, 2013

Related to #270, I'd like to use variables to generate extensionless files:

# config.rb
set :base_url, 'my-site.github.com'
/ CNAME.haml
= base_url

This wil generate CNAME.html or a /CNAME/index.html file, which is not the desired behavior. It should create CNAME (no extension).

I think using frontmatter like extension: false would suffice.

@sethvargo

This comment has been minimized.

Copy link
Contributor Author

@sethvargo sethvargo commented Jan 20, 2013

As a work-around, I was able to do this:

# config.rb
proxy '/CNAME', '/CNAME.html', layout: false, directory_indexes: false

But that still creates CNAME.html, which isn't hurting anyone, but still annoying.

@bhollis

This comment has been minimized.

Copy link
Member

@bhollis bhollis commented Jan 23, 2013

How about this:

# config.rb
proxy '/CNAME', '/CNAME.html', layout: false, directory_indexes: false, ignore: true
@sethvargo

This comment has been minimized.

Copy link
Contributor Author

@sethvargo sethvargo commented Jan 23, 2013

What does 'ignore' do?

@sethvargo sethvargo closed this Jan 23, 2013
@sethvargo

This comment has been minimized.

Copy link
Contributor Author

@sethvargo sethvargo commented Jan 23, 2013

(Closing b/c that fix the issue, but I still would like to learn about the :ignore flag)

@bhollis

This comment has been minimized.

Copy link
Member

@bhollis bhollis commented Jan 23, 2013

The ignore option just prevents the source of the proxy from being output. You could also separately call ignore: http://middlemanapp.com/dynamic-pages/

@timurvafin

This comment has been minimized.

Copy link

@timurvafin timurvafin commented Aug 4, 2014

@bhollis, this issue is relevant when you would like to deploy site to different Github pages.
So we need dynamically define content of CNAME.

proxy '/CNAME', '/CNAME.html', layout: false, ignore: true

Solution above works, but looks like a magic.

@tdreyno

This comment has been minimized.

Copy link
Member

@tdreyno tdreyno commented Aug 4, 2014

@timurvafin You might be able to do the following:

template_extensions.delete(:erb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.