Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

More specific configuration for pages #109

Open
stefanjudis opened this issue Apr 14, 2014 · 2 comments
Open

More specific configuration for pages #109

stefanjudis opened this issue Apr 14, 2014 · 2 comments

Comments

@stefanjudis
Copy link

Hey guys,

thanks for putting this together. :)

One question, I just wanted to kick off a new project and am wondering how you guys deal with page specific stuff like different page titles for example.

As far as I see, it's currently always the same (header.phtml)? Please correct me if I'm wrong.

If I'm correct, do you have plans to make that configurable via pages.json maybe?

Thanks.

Already saw this issue #31, which kind of goes in the same direction.

@anselmh
Copy link
Member

anselmh commented Apr 14, 2014

Hey, you could use replace placeholders for that—please look at how we deal with CSS paths (hint: have a look into grunt replace task and its config).
But I agree, it’s not ideal at the moment. Thanks also for sharing the idea to extend the json for this. I like the idea of having this out of the box but easier than it is currently.

@stefanjudis
Copy link
Author

Hey, you could use replace placeholders for that—please look at how we deal with CSS paths (hint: have a look into grunt replace task and its config).

Hah, that's exactly what I did. ;)
I'll do it again.

    // Versioned references
    replace: {
        build: {
            src: 'temp/**.html',
            dest: 'dist/',
            maincss: '<%= pkg.version %>/main.min.css',
            modernizr: '<%= pkg.version %>/modernizr.min.js',
            mainjs: '<script src="<%= pkg.version %>/main.min.js"></script>'
        },

        dev: {
            src: 'temp/**.html',
            dest: '.',
            maincss: 'css/main.css',
            modernizr: 'components/modernizr/modernizr.js',
            mainjs: '<script data-main="js/config" src="components/requirejs/require.js"></script>'
        }
    }

But it's basically not the same. You're replacing one placeholder with one value for each site. What I'd like to do, is replacing one placeholder with different values.

Kind of like that ( but with title for example ) -> https://github.com/outaTiME/grunt-replace#built-in-replacements.

Anyway, thanks for quick reply. I'll probably figure something out. :)

@anselmh anselmh added this to the v2.0.0 milestone Dec 1, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants