-
Notifications
You must be signed in to change notification settings - Fork 9
New, static site starting from Gatsby starter kit #14
Conversation
Work in progress: ported storybooks content Still needs: - two-level nav hierarchy - styling improvements - stories ;-)
@shilman It the great start! I like the gatsby! I'd be happy to help with it 👍 |
Thanks @usulpro! Let's coordinate with @mnmtanish who is also going to help. Since @mnmtanish worked on the original CRA app, he may have some strong opinions about the transition. I just wanted to get things going because currently https://storybooks.js.org is not getting indexed by Google. The biggest missing items from the old site right now are:
|
Use index.md so that images show properly in github, e.g.: ```md ![Login Form](../static/login_form.png) ```
a few more issues with the old site:
|
This is pretty cool. |
@usulpro @mnmtanish finally figured out how to merge the old code with gatsby, so hold off on contributing until I check in my latest iteration. @usulpro I think those issues with previous site probably deserve to be standalone issues. Let's work it out as soon as I am back to parity with the original site. 😸 |
- get rid of sections concept temporarily - markdown is already parsed to HTML by gatsby
@usulpro @mnmtanish Got it working with some hackery! Please check it out and let me know wha you think. You can now run storybooks. I think we can merge with a little more work. |
Resolve conflicts merging source changes # Conflicts: # components/Docs/Container/index.js # src/docs/react-storybook/configurations/custom-webpack-config.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! In general, everything runs fine. Should we merge it and consistently solve issues?
I tried to test deploying by this steps: npm run build
gh-pages -r https://github.com/UsulPro/storytest.github.io.git -d public -o origin -b master Everything passed without any errors. Result is https://usulpro.github.io/storytest.github.io/ |
html.js
Outdated
@@ -5,6 +5,7 @@ import DocumentTitle from 'react-document-title' | |||
import { prefixLink } from 'gatsby-helpers' | |||
import typography from './utils/typography' | |||
import { colors } from 'utils/colors' | |||
import favicon from './design/homepage/storybook-icon.png' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@usulpro seems unused?
html.js
Outdated
@@ -28,7 +28,7 @@ class HTML extends Component { | |||
content="width=device-width, initial-scale=1.0" | |||
/> | |||
<title>{title}</title> | |||
<link rel="icon" href="favicon.ico" type="image/x-icon" /> | |||
<link rel="icon" href={favicon} type="image/x-icon" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is exactly what I mean! Sorry, I made a typo yesterday
funny that it doesn't cause an error in console since you added favicon.ico
to the project root
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for figuring it out!
@usulpro regarding your test deploy, there is a variable |
Issue: #5
What I did
Ported the old CRA app to gatsby so that the site would be statically generated and indexable from Google. Gatsby and CRA work a bit differently, so I had to hack around to get things working properly.
Major differences from old site:
.js
files for content, we author.md
files, which is more user-friendly. They also render properly in Github source code tree./docs/cat/section/item
. In the new site,/docs/cat/section/item/
./docs/cat/section
and it would dynamically pick out the firstitem
in the section. In the new site, that is handled in the navigation, so all links navigate to specific articles/items. Linking to/docs/cat/
or/docs/cat/section
will 404.react-storybook
, for now.Still needed
Link
instead ofa
How to test
Deploying
Deployment is handled using the
gh-pages
package, that was used by the Gatsby starter kit. I haven't tested it yet.