c-hive / dotdev

Next.js SPA professional website template for teams and individuals: https://c-hive.github.io/dotdev/
MIT License
0 stars 1 forks source link

Read config from build pipeline instead of example file #127

Closed thisismydesign closed 4 years ago

thisismydesign commented 4 years ago

https://github.com/c-hive/dotdev/blob/f3a0c9b6b5593919943de869b3839cd8f71fab63/package.json#L7

https://github.com/c-hive/dotdev/blob/22b7ff34ed94a3a7666906247c8e0e6d1c61faca/src/contexts/Config.js#L3

thisismydesign commented 4 years ago

Let's also gitignore config.yml if possible.

gomorizsolt commented 4 years ago

Let's also gitignore config.yml if possible.

https://github.com/c-hive/dotdev/pull/129/checks?check_run_id=645348012#step:6:12

thisismydesign commented 4 years ago

You could ignore that rule for that import line.

gomorizsolt commented 4 years ago

Yep, that's right but I'd definitely leave a clarification comment on why it's required. I was trying to read up on this topic to find out if there's a best-practice to read and expose arbitrary data to (child) components in a more "nextjs-ish" manner (from the file system). For instance, getStaticProps() is called at build-time to provide data to the pages ahead of the user requests (refer to the referenced chapter, there's a sample how they're using that method to read from the local file system). But I'd say it's just another method to read and expose data compared to our solution in which the file is imported directly in the context provider.

gomorizsolt commented 4 years ago

It'd be great btw not to ignore that rule locally.

gomorizsolt commented 4 years ago

Resolved by #129.