53 Commits

Author SHA1 Message Date
Olivier Meunier
887d0028d1 Moved locales to BCP47 codes
This is a big change, as it renames locale and documentation folders.

- renamed translation folders following BCP47 codes
- improved display of available translations
  Each translation is now displayed in its own language and in the
  current user's language.
- the default language is now "en" instead of "en-US"
- renamed folders in docs/src and docs/translations
- don't copy images from docs/src when they don't contain an index.md
  file
- added a user.Lang() method that returns a code that is guaranteed to
  be available in the locale list
2025-12-16 15:22:05 +01:00
Olivier Meunier
0c0f7c2cd3 Attempt to set a label to dependencies update PR 2025-11-26 14:06:20 +01:00
Olivier Meunier
187eca55a0 Fixed tools/update-dependencies 2025-11-26 13:31:26 +01:00
Olivier Meunier
ad3bcddda6 Updated tools/update-dependencies so it can work on any branch 2025-11-26 13:28:19 +01:00
Olivier Meunier
1a608c555a Translation and documentation generation improvements
- restore completion cutoff to 90%
- apply completion cutoff on documentation
- better output messages for documentation and locales generation
2025-11-20 09:15:50 +01:00
Olivier Meunier
5b6a3c9714 Better base image udpate in build-container script 2025-11-06 11:26:01 +01:00
Olivier Meunier
3888af0ea6 Always update base images in build-container script 2025-11-06 10:18:37 +01:00
Olivier Meunier
cd43ed716a Replaced codeberg.org/readeck/file-compose with an internal tool.
The previous tool was mostly a giant hack around go-jq. It worked but
had limitation and would sadly not keep the object key original order
(and a predictable order matters a bit for the API documentation).

This is only based on go-yaml and deals better with "$merge" entries.
It also introduces a "$include" key so we can have separate markdown
files to the documentation.

Boy do I miss RAML... :)
2025-10-28 11:40:52 +01:00
Olivier Meunier
47f7e31806 Moved to fivefilters repository for site config files 2025-10-24 16:03:00 +02:00
Olivier Meunier
6e02e636d1 Update go version in update-dependencies script
This retrieves the latest Go version and update go.mod when it's a patch
version greater than the current one.
2025-09-16 08:04:49 +02:00
Olivier Meunier
ec5dd8a876 Stop copying missing image files in documentation.
Instead of copying images from en-US when a translation has no
screenshots, we change the image source during the markdown parsing
process.
2025-06-09 15:04:54 +02:00
Olivier Meunier
2baeeafdaf Improved logging in tools/ftr 2025-06-01 12:36:46 +02:00
Olivier Meunier
3470d0acf9 Updated golangci-lint to v2 2025-05-10 13:22:01 +02:00
Olivier Meunier
b128753605 Upgrade html-to-markdown to v2.
Now that it supports tables, we can use it.

Also fixed a deprecation warning with goldmark 1.7.11
2025-05-07 20:09:08 +02:00
Olivier Meunier
c4834a39cb Update go modules the proper way in update-dependencies workflow 2025-05-07 08:13:09 +02:00
Olivier Meunier
05adb0a835 Fixed READECK_SERVER_PORT information on container build process 2025-04-30 19:23:46 +02:00
martenlienen
c41771e7c7 Read the server port from the config file in the container unless explicitly overridden
If the container sets the environment variable, it becomes impossible to override the port via the configuration file because environment variables have higher precedence. Overriding the host makes sense, so that readeck is reachable from outside the container by default. However, fixing the port to the default serves is not required and can be confusing during deployment.
2025-04-30 09:04:02 +00:00
Olivier Meunier
2630ee1678 Applied perfsprint linter
- concatenate simple sprint calls
- use errors.New when possible
- use strconv for "%d" or "%x" sprint calls
2025-02-19 08:35:30 +01:00
Olivier Meunier
4ca9b45751 golangci-lint update and math/rand/v2
- some new revive rules
- removed max and min, now that we have built-ins for them
- added gosec
  - File permissions
  - HTTP servers ReadHeaderTimeout value (and a better metric listener)
- migrated to math/rand/v2 and improved secret key generator
  - Moved to math/rand/v2 everywhere
  - Use crypto/rand for the initial secret key
  - Added some nolint marks on rand.* functions
2025-02-18 20:25:40 +01:00
Olivier Meunier
25d92d4cb3 Fixed CI check in tools/ftr 2025-02-15 08:48:17 +01:00
Olivier Meunier
c6538b3a68 Fixed linter error in tools/ftr 2025-02-12 07:48:42 +01:00
Olivier Meunier
a542cf0474 Use slog in tools/ftr 2025-02-12 07:36:19 +01:00
Olivier Meunier
ba01c7f3db Improved dependencies updater
Removed httpx and conditionally push changes
2025-02-12 07:09:26 +01:00
Olivier Meunier
bffb15d00a chdir to web before performing JS updates 2025-02-11 21:10:44 +01:00
Olivier Meunier
036c5a40bc Forgot an argument in npx call 2025-02-11 21:05:48 +01:00
Olivier Meunier
f234fe9556 Added update-browserlist-db to dependency updater 2025-02-11 21:03:17 +01:00
Olivier Meunier
57bbc70171 Automatic dependencies updater
No need for renovate I guess :)
2025-02-11 20:56:03 +01:00
Olivier Meunier
8a513ec045 Added a /docs/changelog route 2024-11-22 07:06:26 +01:00
Olivier Meunier
90644d2674 Replaced tools/build-container by a python script.
This new script produces an OCI archive using buildah.
This is a necessary step to perform a full build from an action job
and emit all the necessary artifacts for a release.
2024-11-13 22:05:19 +01:00
Olivier Meunier
881481bc37 Base the container image on busybox:uclibc
This busybox version is statically linked and provide a shell, should
you need one. It seems to be needed by the healthcheck command, so
there it is.
2024-03-09 13:40:30 +01:00
Olivier Meunier
6d8f733f38 Documentation i18n
- moved English documentation in en-US subfolder
- allow for links to /docs/{name} to resolve to /docs/{lang}/{name}
- i18n on about page
2024-03-08 20:57:39 +01:00
Olivier Meunier
ab3fcd0826 Updated golangci-lint to 1.56.2 2024-03-04 06:31:00 +01:00
Olivier Meunier
4f20f5f898 Multi arch containers.
This removes the Containerfile and uses buildah directly in order to
build one image per architecture.

Closes #76
2024-01-08 21:57:30 +01:00
Olivier Meunier
3b6a674f87 Lint all the things!
- golangci-lint configuration
- gofumpt on all go files
- added package comments
- added missing comments on exported functions
- do not check for bodyclose on http testing responses.
- check for errors on triggered tasks
- check for errors in acls
- check for errors during policy loading
- check for errors in password recovery process
- better error checking in pkg/extract/contentscripts
- nolint rules for errcheck when it's not needed
  (mostly defer calls for file reader closing)
2023-11-28 20:26:05 +01:00
Olivier Meunier
70b9f4678e Moved everything in src/* back to the root folder.
This was a mistake to use go.work since it might be needed on a
specific dev setup (with different "use" directives).
It results in a codebase that really matches the main readeck
module fqdn.
2023-09-12 20:12:02 +02:00
Olivier Meunier
51b842ebf1 Documentation about OPDS and user profile.
Needs some more work.
2023-08-15 21:56:46 +02:00
Olivier Meunier
9d93223524 Moved the documentation build script to tools/docs 2023-08-14 00:01:24 +02:00
Olivier Meunier
2db11f118b Moved site config files conversion tool to a proper workspace module 2023-08-13 23:44:42 +02:00
Olivier Meunier
8a23cbad74 License prefix in all go files 2023-08-13 20:29:43 +02:00
Olivier Meunier
98ea91fa7f Updated tools/fftr_convert.go build tag 2023-08-10 09:03:07 +02:00
Olivier Meunier
8b848c4f3f Fixed tools/fftr_convert.go
Instead of failing the whole process when one file triggers an error,
log it and carry on.
2023-05-09 21:53:47 +02:00
Olivier Meunier
e11047d041 Moving to github.
Although, it'll never be the upstream repository, it will be the public
one.
2021-05-02 18:58:39 +02:00
Olivier Meunier
32bfac0c1f fftr_convert fix. 2021-04-28 01:03:32 +02:00
Olivier Meunier
3c492df297 Renamed the module to codeberg.org/readeck/readeck
This project was never on github in the first place, so there's no
need to have yet another github namespace.
2021-03-20 14:53:56 +01:00
Olivier Meunier
b97a443a51 Let fftr use json and toml as configuration formats 2021-03-17 21:54:18 +01:00
Olivier Meunier
7fbf851c85 Migrated fftr site-config to go:embed 2021-03-12 00:03:32 +01:00
Olivier Meunier
feccbe3047 Migrated templates to go:embed 2021-03-11 23:36:43 +01:00
Olivier Meunier
fbff575a7c Migrated static www files to go:embed 2021-03-11 20:49:41 +01:00
Olivier Meunier
b05fbda713 Assets route and template generator 2021-03-10 20:05:46 +01:00
Olivier Meunier
5bf188d31b Better project layout
- internal packages
- configs package
2020-06-16 00:59:01 +02:00