hydra-synth / hydra-docs

Documentation for hydra
GNU Affero General Public License v3.0
7 stars 7 forks source link

Host all translations in one place #7

Open ojack opened 2 years ago

ojack commented 2 years ago

I am thinking it could be useful to host all of the translations within the hydra-docs repo (or possibly somewhere else), and then load them directly as raw json from github, such as in the i18next extended example: https://jsfiddle.net/jamuhl/ferfywyf/525/

Pros:

Cons:

micuat commented 2 years ago

would it be like checking the URI and if it's localhost, load json locally and otherwise (i.e., hydra.ojack.xyz), load from github?

but it might not work for hydra-docs because docsify has to load markdown files. maybe - we can point docsify source to raw github and docsify will load files from there... I need to test it

micuat commented 2 years ago

I tried this locally - the root (README) loads the one on github but other pages are still pointing to the local path 😢

window.$docsify = {
  auto2top: true,
  loadSidebar: true,
  // relativePath: true,
  subMaxLevel: 3,
  homepage: 'https://raw.githubusercontent.com/hydra-synth/hydra-docs/main/README.md',
  basepath: 'https://raw.githubusercontent.com/hydra-synth/hydra-docs/main/',
  name: "Hydra",
  repo: "ojack/hydra",
  plugins: [
...
ojack commented 2 years ago

Maybe for docsify it is okay to keep it as is, I was more thinking about storing the json translations for hydra-functions and the web editor here, as it is much more complicated to build and run those repos (requires compilation, etc).