Skip to content

Commit 1fa05e2

Browse files
authored
Merge branch 'main' into refactor-packages
2 parents 8851144 + d4f4e95 commit 1fa05e2

File tree

7 files changed

+670
-53
lines changed

7 files changed

+670
-53
lines changed

custom/conf/app.example.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ RUN_MODE = ; prod
237237
;; PPROF_DATA_PATH, use an absolute path when you start gitea as service
238238
;PPROF_DATA_PATH = data/tmp/pprof
239239
;;
240-
;; Landing page, can be "home", "explore", "organizations" or "login"
240+
;; Landing page, can be "home", "explore", "organizations", "login", or any URL such as "/org/repo" or even "https://anotherwebsite.com"
241241
;; The "login" choice is not a security measure but just a UI flow change, use REQUIRE_SIGNIN_VIEW to force users to log in.
242242
;LANDING_PAGE = home
243243
;;

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
300300
- `ENABLE_GZIP`: **false**: Enable gzip compression for runtime-generated content, static resources excluded.
301301
- `ENABLE_PPROF`: **false**: Application profiling (memory and cpu). For "web" command it listens on localhost:6060. For "serv" command it dumps to disk at `PPROF_DATA_PATH` as `(cpuprofile|memprofile)_<username>_<temporary id>`
302302
- `PPROF_DATA_PATH`: **data/tmp/pprof**: `PPROF_DATA_PATH`, use an absolute path when you start Gitea as service
303-
- `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore, organizations, login\].
304-
303+
- `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore, organizations, login, **custom**\]. Where custom would instead be any URL such as "/org/repo" or even `https://anotherwebsite.com`
305304
- `LFS_START_SERVER`: **false**: Enables Git LFS support.
306305
- `LFS_CONTENT_PATH`: **%(APP_DATA_PATH)/lfs**: Default LFS content path. (if it is on local storage.) **DEPRECATED** use settings in `[lfs]`.
307306
- `LFS_JWT_SECRET`: **\<empty\>**: LFS authentication secret, change this a unique string.

modules/setting/setting.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ var (
106106
StaticCacheTime time.Duration
107107
EnableGzip bool
108108
LandingPageURL LandingPage
109+
LandingPageCustom string
109110
UnixSocketPermission uint32
110111
EnablePprof bool
111112
PprofDataPath string
@@ -776,15 +777,19 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
776777
PprofDataPath = filepath.Join(AppWorkPath, PprofDataPath)
777778
}
778779

779-
switch sec.Key("LANDING_PAGE").MustString("home") {
780+
landingPage := sec.Key("LANDING_PAGE").MustString("home")
781+
switch landingPage {
780782
case "explore":
781783
LandingPageURL = LandingPageExplore
782784
case "organizations":
783785
LandingPageURL = LandingPageOrganizations
784786
case "login":
785787
LandingPageURL = LandingPageLogin
786-
default:
788+
case "":
789+
case "home":
787790
LandingPageURL = LandingPageHome
791+
default:
792+
LandingPageURL = LandingPage(landingPage)
788793
}
789794

790795
if len(SSH.Domain) == 0 {

options/locale/locale_en-US.ini

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3032,54 +3032,54 @@ dependency.id = ID
30323032
dependency.version = Version
30333033
composer.registry = Setup this registry in your <code>~/.composer/config.json</code> file:
30343034
composer.install = To install the package using Composer, run the following command:
3035-
composer.documentation = For more information on the Composer registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/composer/">the documentation</a>.
3035+
composer.documentation = For more information on the Composer registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/composer/">the documentation</a>.
30363036
composer.dependencies = Dependencies
30373037
composer.dependencies.development = Development Dependencies
30383038
conan.details.repository = Repository
30393039
conan.registry = Setup this registry from the command line:
30403040
conan.install = To install the package using Conan, run the following command:
3041-
conan.documentation = For more information on the Conan registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/conan/">the documentation</a>.
3041+
conan.documentation = For more information on the Conan registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/conan/">the documentation</a>.
30423042
container.details.type = Image Type
30433043
container.details.platform = Platform
30443044
container.details.repository_site = Repository Site
30453045
container.details.documentation_site = Documentation Site
30463046
container.pull = Pull the image from the command line:
3047-
container.documentation = For more information on the Container registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/container/">the documentation</a>.
3047+
container.documentation = For more information on the Container registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/container/">the documentation</a>.
30483048
container.multi_arch = OS / Arch
30493049
container.layers = Image Layers
30503050
container.labels = Labels
30513051
container.labels.key = Key
30523052
container.labels.value = Value
30533053
generic.download = Download package from the command line:
3054-
generic.documentation = For more information on the generic registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/generic">the documentation</a>.
3054+
generic.documentation = For more information on the generic registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/generic">the documentation</a>.
30553055
maven.registry = Setup this registry in your project <code>pom.xml</code> file:
30563056
maven.install = To use the package include the following in the <code>dependencies</code> block in the <code>pom.xml</code> file:
30573057
maven.install2 = Run via command line:
30583058
maven.download = To download the dependency, run via command line:
3059-
maven.documentation = For more information on the Maven registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/maven/">the documentation</a>.
3059+
maven.documentation = For more information on the Maven registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/maven/">the documentation</a>.
30603060
nuget.registry = Setup this registry from the command line:
30613061
nuget.install = To install the package using NuGet, run the following command:
3062-
nuget.documentation = For more information on the NuGet registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/nuget/">the documentation</a>.
3062+
nuget.documentation = For more information on the NuGet registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/nuget/">the documentation</a>.
30633063
nuget.dependency.framework = Target Framework
30643064
npm.registry = Setup this registry in your project <code>.npmrc</code> file:
30653065
npm.install = To install the package using npm, run the following command:
30663066
npm.install2 = or add it to the package.json file:
3067-
npm.documentation = For more information on the npm registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/npm/">the documentation</a>.
3067+
npm.documentation = For more information on the npm registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/npm/">the documentation</a>.
30683068
npm.dependencies = Dependencies
30693069
npm.dependencies.development = Development Dependencies
30703070
npm.dependencies.peer = Peer Dependencies
30713071
npm.dependencies.optional = Optional Dependencies
30723072
npm.details.tag = Tag
30733073
pypi.requires = Requires Python
30743074
pypi.install = To install the package using pip, run the following command:
3075-
pypi.documentation = For more information on the PyPI registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/pypi/">the documentation</a>.
3075+
pypi.documentation = For more information on the PyPI registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/pypi/">the documentation</a>.
30763076
rubygems.install = To install the package using gem, run the following command:
30773077
rubygems.install2 = or add it to the Gemfile:
30783078
rubygems.dependencies.runtime = Runtime Dependencies
30793079
rubygems.dependencies.development = Development Dependencies
30803080
rubygems.required.ruby = Requires Ruby version
30813081
rubygems.required.rubygems = Requires RubyGem version
3082-
rubygems.documentation = For more information on the RubyGems registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/rubygems/">the documentation</a>.
3082+
rubygems.documentation = For more information on the RubyGems registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">the documentation</a>.
30833083
settings.link = Link this package to a repository
30843084
settings.link.description = If you link a package with a repository, the package is listed in the repository's package list.
30853085
settings.link.select = Select Repository

0 commit comments

Comments
 (0)