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

Create a main config in templates.json #10

Open
fdelaneau opened this issue Feb 13, 2021 · 0 comments
Open

Create a main config in templates.json #10

fdelaneau opened this issue Feb 13, 2021 · 0 comments

Comments

@fdelaneau
Copy link
Collaborator

fdelaneau commented Feb 13, 2021

Move default configurations from the "common" route to a specific "config" route:

// Configuration
"config": {
    "routeInheritanceModel": "inherit", // optional - default: replace see #7
    "routeNameAsFilenameEnabled": true,
    "javascriptsDeferEnabled": true
}

// Common rules applied by default to all pages
"*": {
    "stylesheets": [
        {
            "media": "screen", // optional - default: all
            "url": "/css/public.css"
        }
    ],
    "javascripts": [
        "/js/vendor/modernizr-2.8.3.min.js",
        "/js/tooltip.js",
        "/handlers/main.js"
    ]
},

"myPage": {
    "stylesheets": [
      {
        "url": "/css/page.css"
      }
    ]
}

The "common" route should only contain elements that can be declared in other routes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant