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

Better default site #591

Merged
merged 1 commit into from May 23, 2015

Conversation

Projects
None yet
2 participants
@ddfreyne
Copy link
Member

commented May 17, 2015

The new default site now includes a sample compilation rule for RDoc, along with a sample RDoc file (hopefully clearly enough marked as “just for demonstration purposes”). It also comes with a commented-out compilation rule for Markdown files.

It also adds rdoc to the list of text extensions, because otherwise the site wouldn’t compile :)

Potential fix for #588.

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented May 17, 2015

I also got carried away and simplified file writing — see 581b7cc.

@@ -107,13 +107,36 @@ def array_to_yaml(array)
#!/usr/bin/env ruby
compile '/**/*.html' do
filter :erb

This comment has been minimized.

Copy link
@bobthecow

bobthecow May 18, 2015

Member

👍 on not using an erb filter by default :)

This comment has been minimized.

Copy link
@ddfreyne

ddfreyne May 18, 2015

Author Member

Yeah, that was weird.

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented May 18, 2015

I think the comment for the RDoc rule should be altered somewhat. It is currently this:

This is an example rule that matches RDoc (.rdoc) files, and filters them
using the :rdoc filter. A newly created site comes with one RDoc-formatted
file, content/samples.rdoc, for demonstration purposes.

I believe this will be more clear:

This is an example rule that matches RDoc (.rdoc) files, and filters them
using the :rdoc filter. A newly created site comes with one RDoc-formatted
file, content/samples.rdoc, for demonstration purposes. If you do not need RDoc,
feel free to remove this rule as well as the content/samples.rdoc file.

@bobthecow

This comment has been minimized.

Copy link
Member

commented May 18, 2015

i would use parenthesis or em dashes instead of commas around content/samples.rdoc.

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented May 18, 2015

Oh, it also needs to tell to replace {html,rdoc,md} with just {html,md}.

This is an example rule that matches RDoc (.rdoc) files, and filters them
using the :rdoc filter. For demonstration purposes, a newly created site
comes with one RDoc-formatted file (content/samples.rdoc).

If you do not need RDoc, feel free to remove this rule, the content/samples.rdoc file,
and replace {html,rdoc,md} with just {html,md}.

That’s getting pretty wordy. :(

Having thought about this some more, I think I would rather not have anything RDoc-like in there by default. Nobody uses it (I know, because nobody complained about rdoc not being in text_extensions). Everyone uses Markdown instead.

@bobthecow

This comment has been minimized.

Copy link
Member

commented May 18, 2015

So just having a commented out markdown rule should be enough, yeah?

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented May 18, 2015

Yeah, I think I’ll do it that way.

@ddfreyne ddfreyne added status:wip 🔧 and removed to review labels May 18, 2015

@ddfreyne ddfreyne force-pushed the better-default-site branch from 581b7cc to aa3c520 May 22, 2015

@@ -33,7 +33,7 @@ class Site
# that lacks some options, the default value will be taken from
# `DEFAULT_CONFIG`.
DEFAULT_CONFIG = {
text_extensions: %w( css erb haml htm html js less markdown md php rb sass scss txt xhtml xml coffee hb handlebars mustache ms slim ).sort,
text_extensions: %w( css erb haml htm html js less markdown md php rb sass scss txt xhtml xml coffee hb handlebars mustache ms slim rdoc ).sort,

This comment has been minimized.

Copy link
@ddfreyne

ddfreyne May 22, 2015

Author Member

I kept rdoc in there—I think it makes sense to have it in there.

Improve default Rules for new sites
* Better handling of non-root pages
* Commented-out Markdown rule

@ddfreyne ddfreyne force-pushed the better-default-site branch from 2f183fb to d4bbdae May 22, 2015

@ddfreyne ddfreyne added to review and removed status:wip 🔧 labels May 22, 2015

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented May 22, 2015

RDoc stuff removed. To review!

ddfreyne added a commit that referenced this pull request May 23, 2015

@ddfreyne ddfreyne merged commit fe54a27 into master May 23, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ddfreyne ddfreyne deleted the better-default-site branch May 23, 2015

@bobthecow

This comment has been minimized.

Copy link
Member

commented May 26, 2015

👍 LGTM.

@ddfreyne ddfreyne removed the to review label May 26, 2015

@ddfreyne ddfreyne modified the milestone: 4.0.0 Jun 20, 2015

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.