- #26 gulpfile.js's
ignore
option is no longer ignored
- New version of the Prismic kit, that comes with several new features such as fetchLinks and UID
- #19 don't overwrite cfg.option
- #22 Fix issue for global escape
- The updated version of the Prismic kit has changes on DocumentLink that should be transparent for most users but may require an adaptation for some cases; see https://github.com/prismicio/javascript-kit/commit/21ef7ff8d2a1ac872402528dfaa638e5f511ffd1
srcDir
ordstDir
could not be overwritten ingulpfile.js
.- The dynamic browser was activated for every query strings, now only the ones containing at least
ref
oraccess_token
will fire it.
- It is now possible to ignore some file/directories
- Globbing is accepted (e.g. “
.*~
”) - The destination directory is automatically ignored if in the source directory
- It is now possible to call
baked --src . --dst build
with infinite loop
- It is now possible to call
- Globbing is accepted (e.g. “
- The default source directory of the
baked
command is now the current directory- A baked website can now be generated using only
baked
without options
- A baked website can now be generated using only
- The default directories are changed
- The
baked
command now uses the current directory as source directory - The Gulp file still uses
to_generate
andgenerated
by default- The projects using baked's
gulp.js
file should not be impacted
- The projects using baked's
- The
- Allow to use page's params in query attributes
- The queries results are no longer arrays but prismic.io's javascript-kit's
Response
object.- The response elements are in its
results
field
- The response elements are in its
- It it now possible to specify a ref & accessToken server side.
- Allow to display some content only when the page is generated by browser/server.
- For this purpose, the helpers
onlyBrowser
andonlyServer
have been introduced.
- For this purpose, the helpers
- Allow eager loading of a query results' linked documents.
- To do so, add
data-eager="true"
in your query tag.
- To do so, add
- The oauthCliendId set in the config.json file is now sent to the browser
- Stop generating a local version of the library
- In order to use the dynamic generation, you should either
- refer to an official library (for instance
https://prismicio.github.io/baked.js/baked-0.0.7.js
) - build yourself you own version of the library and put it yourself in the generated directory
- refer to an official library (for instance
- This change allows to simplify the use, and reduce the building time ()
- In order to use the dynamic generation, you should either
baked is now a npm module containing an executable!
This means:
- you don't have to work inside the baked.js repository anymore
- you can use baked.js without creating any gulpfile.js and package.json file
WARNING
Because of this change, if you worked inside the baked.js directory in order to build your website, I strongly recommand to adapt you code accordingly:
- cleanup
package.json
and addbaked
in dependencies (look atexample/blank/package.json
)
- since this point, you can install and use the
baked
module
- updates your
gulpfile.js
file to load"baked/gulp"
instead of"./src/tasks/gulp"
- since this point, you are not using the local baked.js files
- you can now delete the
src
directory since you don't need it anymore - If you didn't do it already, you can also delete the
example
directory and theREADME.md
andCHANGELOG.md
files.
- Only errors are now displayed by default.
- (ok this is not an error but it's still cool)
- Add
pathToHere
helper (returns the path of the current page) - Add
urlTo
andurlToHere
helpers (return the full URL)- do not confuse the new
urlTo
helper and the old (badly named) helperurl_to
which returns only a path.
- do not confuse the new
- Add a global configuration file, which handles:
- the logger level
- the API's URL
- the base URL
- The
url_to
helper has been renamed intopathTo
- the old version is still supported by deprecated
- Replace
src_dir
anddst_dir
bysrcDir
anddstDir
, but it should not break existing gulpfiles- the
init()
helper still supportssrc_dir
anddst_dir
- the
parseOptions()
helper's response and thebaked.config.options
object havesrc_dir
anddst_dir
as r/w properties.
- the
- Templates can now include Javascript files using
require
- Theses files are evaluated inside the template context
- They are cached (but it's possible to bypass the cache)
- Added
clean
task - Fixed a bug which may block generation
- Add template partial
- A partial is a template whose name starts by “_”. It won't be rendered directly (so it doesn't need meta like “prismic-api”) but is included in other
templates using the helper
partial
. ([%- partial('footer') %]
will include the partial “_footer.html.erb”)
- A partial is a template whose name starts by “_”. It won't be rendered directly (so it doesn't need meta like “prismic-api”) but is included in other
templates using the helper
- Add helper to change ref
- Add OAuth2 authentication
- Use EJS for template rendering
- Its HTML escaping and filters are available
- Because EJS is now used, every template returning HTML have to be fixed
(by replacing
[%= ... %]
by[%- ... %]
) in order to stop escaping the HTML twice.
- The dynamic mode is now based on the HTTP server
- custom routes are honored in this mode too
url_to
now accepts global paths (“/index
” for instance)
- It is now possible to specify an
access_token
and aref
in the queryString
- Split tasks “
gulp
” and “gulp serve
” - ⚠ Remove the generate.js file
- Run
gulp --src <src> --dst <dst>
instead
- Run
- Non-template HTML files are now copied correctly
- Supports query parameter names using camelcase
- Add HTTP server to serve generated file
- the generation is automatically performed when content is modified
- Replace Grunt by Gulp
- ⚠ baked.js can now be runned using
node generate.js <src> <dst>
orgulp
- the old way (
node src/server.js <src> <dst>
) is not working anymore
- the old way (
- remove
.html
from generated files
- Fix query escape pattern (
$$
was not escaping) - baked: Queries can now refer to bookmarks