astro-paper icon indicating copy to clipboard operation
astro-paper copied to clipboard

Move text content to separate file

Open fchrapek opened this issue 1 year ago • 3 comments

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?

fchrapek avatar Sep 27 '23 16:09 fchrapek

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?

satnaing avatar Oct 03 '23 08:10 satnaing

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

fchrapek avatar Oct 03 '23 10:10 fchrapek

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

SSmale avatar Dec 30 '23 22:12 SSmale