Phenomic v1.0.0-beta.3 Release Notes
Release Date: 2018-05-24 // almost 6 years ago-
Hopefully, the last beta
๐ We are very close to our final and stable release for v1. Why we didn't ship
๐ this version already? Some people like to move fast & break things. But we
wanted to have a correct design for the v1 so future majors version won't break
too much things.What we did for v0.x was an experiment and we learned a lot of things by running
this in production on moderate websites. We have spent a lot of brain energy to
๐ make a scalable & flexible solution with a small API surface.We have designed an architecture that follow React way of thinking, by offering
๐ฆ a centralized lifecycle. With that in
mind we have adjusted our goal and make React & Webpack, 2 core pieces of v0.x,
๐ first class plugins in our v1.x. This opens up lot of nice things to support
React or Webpack alternatives.๐ Documentation is a work in progress ๐
First thing to celebrate, we started to work on our website! You can now find
๐ documentation for the core and the
๐ฆ react preset tutorial! More things will
follow!2 small breaking changes
Below you will find 2 small breaking changes, very easy to adjust (that will
probably consist of addingcontent
in front of all your current existing query
๐ง to our content api or to adjust your configuration).๐ฑ ๐จ
@phenomic/core
:content
options now supports multiples entries and globs
(+
fixup)
by @MoOxAll your previous queries won't work with this breaking change but don't
worry, it's very easy to adjust your code.๐ We are sorry to add a breaking change now, but it's for the better.
Solution 1 (recommended): You will have to add "content/" in front of all
yourpath
in your queries. Why? It's for being more explicit and also be able
๐ to support multiples sources (multiples folders) to avoid duplicate names
โฌ๏ธ without a weird configuration. The upgrade is pretty easy.For example
const HomeContainer = withPhenomicApi(Home, props =\> ({ posts: query({ path: "posts" }) }));
Will become
const HomeContainer = withPhenomicApi(Home, props =\> ({ posts: query({ path: "content/posts" }) }));
Solution 2 (for lazy people): You can keep the previous behavior very easily
by using this value forcontent
option:"": {root: "content", globs: ["**/*"]}
. You can throw that in yourpackage.json
in aphenomic
like this:"phenomic": { "content": { "": {root: "content", globs: ["\*\*/\*"]} }, "presets": ["@phenomic/preset-react-app"] }
๐ฑ ๐จ
@phenomic/plugin-rss-feed
: now lookup incontent/posts
by default.
by @MoOx๐ง To get previous behavior back, just use this configuration (adjust to match
yours):"phenomic": { "presets": ["@phenomic/preset-react-app"], "plugins": [[ "@phenomic/plugin-rss-feed", { "feeds": { "feed.xml": { "query": { "path": "content/posts" } } } }] ] },
๐ Bugfixes
๐ฑ ๐
@phenomic/plugin-renderer-react
: Handle scroll like it should (to top or to the hash if any)
by @MoOx๐ฑ ๐
phenomic/plugin-collector-files
: correctly clean extensions from filename for id (not only md|json but all extensions by the plugin loaded at runtime)
by @MoOxTons of small improvements
๐ As we started to actively working on our documentation, we have added tons of
small improvements.๐ฑ โจ
@phenomic/plugin-renderer-react
: add render + callback option to createApp/renderApp for custom rendering
by @MoOxThis commit allows you to use a custom render() function. This way to render the
๐ app is required by some solutions that needs a custom wrapper for styles
๐ pre-rendering (eg: react-native-web).๐ฑ ๐ examples/react-native-web-app
by @MoOx๐ฑ โจ
@phenomic/core
: add socketPort option (and switch to 3334 since 1415 can be used by dbstar)
by @MoOx๐ฑ โจ
@phenomic/core
: Improve error shown from database access
by @MoOx๐ฑ โจ
@phenomic/core
: Improve error message from database not found entry
by @MoOx๐ฑ ๐ฅ Add a new helper to extract meta from body nodes (title + headings list)
(+
fixup)
by @MoOx๐ This helper is used in
@phenomic/plugin-transform-markdown
and
@phenomic/plugin-transform-asciidoc
to automatically add atitle
meta
even if you don't have frontmatter. Pretty cool for files that you don't
control. This helper also returns a list of headings in your content, which is
pretty convenient to make a table of content at the top of you page or in a
sidebar.๐ฑ โจ
@phenomic/plugin-transform-markdown
: add title fallback extracted from markdown body if no title is in the frontmatter + add a list of markdown headings
(+
fixup)
by @MoOx๐ฑ โจ
@phenomic/plugin-transform-asciidoc
: add title fallback extracted from markdown body if no title is in the frontmatter + add a list of markdown headings
(+
fixup)
by @MoOx๐ฑ โจ
@phenomic/plugin-transform-json
: add title fallback
by @MoOx๐ โจ
@phenomic/core
: better display in case of error during start/build
by @MoOx๐ฑ โจ
@phenomic/core
: add options to sort db results
by @MoOxThis feature is pretty awesome and allows you to add custom order to your query.
As a good example, we wanted to sort our showcase with the following algorithm:- Sites with a flag
curated
first - Sites with many tags
- Sites with tags "blog" at the end.
In order to do so, we have introduced this option and we hope you will like it.
You can check out the
๐ documentation fordb.sortFunctions
and take a look to the
one we use for the showcase.๐ฑ โจ
@phenomic/cli
: add preview command
by @MoOx๐ โจ
@phenomic/core
: add preview command to build & serve results
by @MoOxNow you can run
phenomic preview
๐ This will build and serve the website, to mimic production (as you will have the
pre-rendered files and the client side reconciliation). - Sites with a flag