Landing Pages Plugin :kleines_airplane:

This looks exciting. Hoping to use a landing page to list upcoming events, or at least by tag.

Thanks!

Thanks for the patch! That works well. Do you think that it would be reasonable to add a config option for the landing homepage path? I tried other solutions to set a custom home page, but this is the only one that actually worked for me and this landing pages plugin.

Is there a way to access values from the plugin variables in the plugin.rb file?

@angus, is there a way to render the content of certain custom landing pages inside the normal Discourse layout instead of the layout for the landing pages plugin?

Not directly, but perhaps explain a bit more about what you have in mind and I’ll point you in the right direction.

I’m wondering if we can have the content of the custom landing pages load directly inside the main Ember app container layout rather than the landing pages layout?

I know now that Discourse has the option to turn topics into static pages, but I’d rather not have the author info at the top or have the page URLs nested under /pub/.

I have one example where I’d like to link to one of the static pages in the nav using the custom nav items component, but because it is not a path that the Ember app recognizes, it gives a 404 page when clicking the link in the header. If you navigate directly to the page URL it works fine, but not through Ember app links.

Is this plugin mostly meant to only work with static landing pages for when the user is not logged in or signed up, not inside the main app layout for logged-in users?

I see.

Is this the only reason you’re interested in rendering the content of landing page in Ember? If so we can handle that in a more lightweight way.

Thank you. I’m hoping to be able to render either the built in Discourse pages or those of the landing pages plugin inside the ember app layout as informational pages for site members.

Some pages are for the public and can be rendered in the landing pages plugin layout and others will be for logged-in users and should be rendered in the main app layout so the customizations I’ve done for the main app can be persisted including custom nav items and the user menu.

There doesn’t seem to be any existing way to do this with plugins or the Discourse core. Everything seems to be using their own layout for custom pages. Do you know if this is just a use-case limitation by existing solution’s developers, or a limitation of the Discourse platform itself?

I’m imagining that it involves more or less pulling custom pages from an API endpoint and using the slugs to match against the wildcard falback path in the js router?

hm, the distinctions you’re drawing here will make less sense once you get into the weeds a bit more.

Can you give me an example of this kind of page? Yes it’s true that the landing pages plugin doesn’t include the discourse nav items and user menu, however if you want those in a page, it’s best to create it for each specific use case within the Discourse app itself on a case by case basis. Trying to recreate them in a landing page wouldn’t make sense.

The reason there isn’t a generic way of doing this is because there isn’t a generic use case per se. There’s a number of approaches you can take, the best one will depend on what you’re looking to achieve. It’s best if you lay what you’re trying to do in more detail, then I can give you more specific advice.

Start a new topic in dev or over on Pavilion explaining what you’re doing in detail and @me.

Alright, thank you. I’ll do that :blush:

Ein Beitrag wurde in ein neues Thema aufgeteilt: Fehler beim Importieren eines privaten Repos

Hallo, ich kann das Beispielthema nicht installieren, können Sie mir helfen?

Sie müssen beschreiben, was Sie getan haben und was passiert ist, als Sie es versucht haben.

1 „Gefällt mir“

https://develcoder.com/join Ich verstehe diesen Teil nicht

Hallo @angus, ich habe versucht, dieses Plugin auf meiner Discourse-Instanz zu installieren, aber nach dem Versuch, die App neu zu erstellen, erhielt ich immer wieder Fehler. Dies sollte der relevante Teil sein:

I, [2022-06-16T15:13:33.339825 #1]  INFO -- : \u003e cd /var/www/discourse \u0026\u0026 su discourse -c 'bundle exec rake db:migrate'
rake aborted!
Gem::LoadError: can't activate jquery-rails-4.4.0, already activated jquery-rails-4.5.0
/var/www/discourse/lib/plugin_gem.rb:27:in `load'
/var/www/discourse/lib/plugin/instance.rb:773:in `gem'
/var/www/discourse/plugins/discourse-landing-pages/plugin.rb:20:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:679:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:679:in `activate!'
/var/www/discourse/lib/discourse.rb:279:in `block in activate_plugins!'
/var/www/discourse/lib/discourse.rb:276:in `each'
/var/www/discourse/lib/discourse.rb:276:in `activate_plugins!'
/var/www/discourse/config/application.rb:228:in `block in \u003cclass:Application\u003e'
/var/www/discourse/lib/plugin.rb:6:in `initialization_guard'
/var/www/discourse/config/application.rb:227:in `\u003cclass:Application\u003e'
/var/www/discourse/config/application.rb:81:in `\u003cmodule:Discourse\u003e'
/var/www/discourse/config/application.rb:80:in `\u003ctop (required)\u003e'
/var/www/discourse/Rakefile:7:in `require'
/var/www/discourse/Rakefile:7:in `\u003ctop (required)\u003e'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `\u003ctop (required)\u003e'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `\u003cmain\u003e'
(See full trace by running task with --trace)
I, [2022-06-16T15:13:34.530066 #1]  INFO -- : gem install jquery-rails -v 4.4.0 -i /var/www/discourse/plugins/discourse-landing-pages/gems/2.7.6 --no-document --ignore-dependencies --no-user-install
Successfully installed jquery-rails-4.4.0
1 gem installed

I, [2022-06-16T15:13:34.530330 #1]  INFO -- : Terminating async processes
I, [2022-06-16T15:13:34.530366 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 42
103:signal-handler (1655392414) Received SIGTERM scheduling shutdown...
I, [2022-06-16T15:13:34.530403 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103
2022-06-16 15:13:34.530 UTC [42] LOG:  received fast shutdown request
103:M 16 Jun 2022 15:13:34.546 # User requested shutdown...
103:M 16 Jun 2022 15:13:34.546 * Saving the final RDB snapshot before exiting.
2022-06-16 15:13:34.551 UTC [42] LOG:  aborting any active transactions
2022-06-16 15:13:34.553 UTC [42] LOG:  background worker \"logical replication launcher\" (PID 51) exited with exit code 1
2022-06-16 15:13:34.554 UTC [46] LOG:  shutting down
103:M 16 Jun 2022 15:13:34.668 * DB saved on disk
103:M 16 Jun 2022 15:13:34.668 # Redis is now ready to exit, bye bye...
2022-06-16 15:13:34.724 UTC [42] LOG:  database system is shut down

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse \u0026\u0026 su discourse -c 'bundle exec rake db:migrate' failed with return #\u003cProcess::Status: pid 1735 exit 1\u003e
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {\"cd\"=\u003e\"$home\", \"hook\"=\u003e\"db_migrate\", \"cmd\"=\u003e[\"su discourse -c 'bundle exec rake db:migrate'\"]}\nbootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
bd8d903e1ec861801fdd32f7c35089aaebb97ca210dbe6eb5d584fc58379773e

Ich glaube, das ist das Problem: Gem::LoadError: can't activate jquery-rails-4.4.0, already activated jquery-rails-4.5.0.
Das sollte eine einfache Lösung sein, oder? Muss ich nur die Abhängigkeiten von gem \"jquery-rails\", \"4.4.0\" in plugin.rb auf gem \"jquery-rails\", \"4.5.0\" aktualisieren?

Vielen Dank für dieses Plugin.

Das Plugin scheint tatsächlich ausgefallen zu sein. Möglicherweise müssen Sie jedoch bis zur ersten Juliwoche auf einen Patch warten.

https://discourse.pluginmanager.org/t/discourse-landing-pages-master-does-not-work-on-tests-passed/145

4 „Gefällt mir“

Dieses Plugin funktioniert wieder mit der neuesten Version von Discourse :tada:

4 „Gefällt mir“

Schön zu hören, dass du dich von Covid erholt hast. Danke, dass du das Plugin unter diesen Umständen repariert hast… :hugs: Ruh dich mehr aus!

3 „Gefällt mir“

Leider wird dieses Plugin ausgemustert, weshalb es den Tag end-of-life hat. Ich werde hier nicht auf technische Details eingehen, aber es ist angesichts einiger Änderungen in discourse/discourse sowie der allgemeinen Arbeitslast und Ressourcenallokation innerhalb von Pavilion nicht mehr sinnvoll, es weiter zu pflegen.

Das Plugin funktioniert mit dem neuesten tests-passed, wird jedoch nicht mehr mit Änderungen an discourse/discourse aktualisiert. Wenn jemand dies in Zukunft als Projekt übernehmen möchte, bin ich gerne bereit, mit ihm daran zu arbeiten.

7 „Gefällt mir“

Danke für die Arbeit daran; es hat viel Spaß gemacht, es zu benutzen.

Könnte mir jemand auf die Änderungen in discourse/discourse hinweisen, auf die wir uns stattdessen für die Zukunft konzentrieren können?

1 „Gefällt mir“

Das freut mich!

Ah, Entschuldigung, ich meinte nicht, dass es eine Alternative in discourse/discourse geben wird (obwohl Page Publishing für einige Anwendungsfälle geeignet sein könnte). Ich meinte, dass sich die technische Struktur von Discourse so verändert hat, dass dieses Plugin ohne erheblichen Aufwand zur Änderung seiner Funktionsweise unmöglich ist. Wir sind im Moment mit anderen Arbeiten bei Pavilion sehr beschäftigt und ich kann nach bestem Wissen und Gewissen nicht versprechen, dieses Plugin bei weiteren Änderungen in Discourse zu warten.

Pavilion arbeitet an unseren eigenen neuen Landing Pages. Wir werden Hugo anstelle dieses Plugins verwenden.

1 „Gefällt mir“