-
Notifications
You must be signed in to change notification settings - Fork 322
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
Developer FAQs for PortalJS #878
Comments
Related to #878 ## Changes How-to docs pages: - /howto/index: home page for guides - /howto/analytics: "How to add Google Analytics?" - /howto/seo: "How to customize page metadata for SEO?" - /howto/sitemap: "How to build a sitemap?" - /howto/blog: "How to add a simple blog?" - blog index page - blog layout - comments -> link to the page below - /howto/comments: "How to add user comments?" - /howto/markdown: "How to add markdown-based content pages?" - /howto/drd: "How to create data-rich documents with charts and tables?"
@rufuspollock can we close this and open an issue for v2? |
@olayway why do we want to close and open a follow up - i'd want to at least keep overall list in one place so easy to follow what we have done. We can open subissues to this quasi-epic e.g. for recommendations for improvements to core libraries. |
Because I feel like this is usually what we do (open issue for V2 etc) 😅 But ok, let's leave this one. |
@olayway yes on this one it's a lot easier to see the progress because we are working through a specific list for now - i understand about often splitting especially as work flows across iterations. As i said we can have sub-issues for stuff like improvements to core libs. |
@olayway @luccasmmg @demenech @anuveyatsu can someone update the issue? i just want to understand if we're still working on these items and if we're following the plan. thanks 🙏 |
Hi @popovayoana . I'm not sure about the state so I'm going to leave it for @luccasmmg |
@popovayoana the current version of this is on https://portaljs.org/howtos but no work has been done on it for a few weerks, this issue is kinda of an epic so it will not get closed for the time being, but technically the first version of this has already been done. |
A data portal is built with multiple features. We want to identify and list the most common ones and explain what is the easiest way to do them using PortalJS.
Acceptance
Tasks
/howtos/analytics
and an index pageshowtos
which uses obsidian wikilinking to link to each page with a nice title e.g.[[analytics|How to add web analytics]]
Questions
List of features
List of features
pageview
function exported from@flowershow/core
: https://github.com/datopian/flowershow/blob/main/packages/core/src/utils/gtag.tsuseEffect
hook inpages/_app.tsx
(but this could also be wrapped in a custom React hook that would be exported from core package or portaljs) https://github.com/datopian/flowershow/blob/df602b840dc3898142452921ed1558e2fdb276c8/packages/template/pages/_app.tsx#L69-L79@flowershow/core
but can be easily extractedsitemap.mjs
that generates thepublic/sitemap.xml
file@flowershow/markdowndb
package (if we extract it, we could make it independent on markdowndb = generic) https://github.com/datopian/flowershow/blob/main/packages/template/scripts/sitemap.mjspackage.json
@flowershow/core
next-seo
packagepages/_app.tsx
based on values set in user'sconfig.mjs
file https://github.com/datopian/flowershow/blob/df602b840dc3898142452921ed1558e2fdb276c8/packages/template/pages/_app.tsx#L88pages/[...slug]tsx
based on page metadata passed to it fromgetStaticProps
https://github.com/datopian/flowershow/blob/df602b840dc3898142452921ed1558e2fdb276c8/packages/template/pages/%5B...slug%5D.tsx#L21-L53@flowershow/core
BlogLayout
in@flowershow/core
BlogsList
component in@flowershow/core
that can be imported, but the user has to create the index page in/pages
himselfBlogLayout
@flowershow/core
@flowershow/core
Notes
Improvements to PortalJS
Currently, everything in the list can be done, since PortalJS runs over Next.js, but of course, that's too cumbersome.
The means to make those features available on PortalJS are:
Provider component
We could have a , similar to SessionProvider, ThemeProvider, etc.
This could be helpful to avoid copy/pasting code e.g. check if there's a GA token in the configs and setup the pageview call on route change events.
Specifically, everything in here could be done inside this provider and users would just have to wrap their apps inside it
https://github.com/datopian/flowershow/blob/main/packages/template/pages/_app.tsx --
E.g:
The text was updated successfully, but these errors were encountered: