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
Merged

Better default site #591

merged 1 commit into from May 23, 2015

Conversation

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne 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
Copy link
Member Author

@ddfreyne ddfreyne commented May 17, 2015

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

Loading

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

@bobthecow bobthecow May 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 on not using an erb filter by default :)

Loading

Copy link
Member Author

@ddfreyne ddfreyne May 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was weird.

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne 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.

Loading

@bobthecow
Copy link
Member

@bobthecow bobthecow commented May 18, 2015

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

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne 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.

Loading

@bobthecow
Copy link
Member

@bobthecow bobthecow commented May 18, 2015

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

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented May 18, 2015

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

Loading

@@ -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,
Copy link
Member Author

@ddfreyne ddfreyne May 22, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Loading

* Better handling of non-root pages
* Commented-out Markdown rule
@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented May 22, 2015

RDoc stuff removed. To review!

Loading

ddfreyne added a commit that referenced this issue May 23, 2015
@ddfreyne ddfreyne merged commit fe54a27 into master May 23, 2015
1 check passed
Loading
@ddfreyne ddfreyne deleted the better-default-site branch May 23, 2015
@bobthecow
Copy link
Member

@bobthecow bobthecow commented May 26, 2015

👍 LGTM.

Loading

@ddfreyne ddfreyne added this to the 4.0.0 milestone Jun 20, 2015
@ddfreyne ddfreyne added this to the 4.0.0 milestone Jun 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants