astro-paper
astro-paper copied to clipboard
Move text content to separate file
Hi @satnaing, great work - I love the template!
I have a couple ideas that might be worth considering.
One of them is to move all the static text content (headings, descriptions, button names etc.) to one place for a bit easier management. In my case, I moved it to a separate JS object in a new file. Then it's just a matter of importing it wherever you might need it.
What do you think?
Yep. This might be beneficial for AstroPaper users when they want to upgrade the template. I'm also considering integrating a CLI for AstroPaper in the future, so it could be worthwhile.
However, on the other hand, it might be a bit confusing for some users when they want to customize/extend the template.
Can you also provide me a repo or link as an example for your approach?
I'm relatively new to the modern JS framework scene, so I'm not saying this solution is anywhere close to the best one, but here is what I did:
https://github.com/fchrapek/filipchrapek.pl/blob/main/src/content/content.js
It would also be good to Get a section on all the things that need to be edited to make this your own (or move the content to a central location) .
- [ ] src/pages/about.md
- [ ] src/pages/index.astro