Publicación de la página

I would like to replace procourse-static-pages with “page publishing”. Is it somehow possible to add the default discourse header to “published page”? I mean, show the logo on the left side, the search, hamburger icon, avatar and the related functionality for theses buttons on the right side. Then it would be a replacement of procourse-static-pages.

Additionally, it would be great to use DiscoTOC for the published page, too.

7 Me gusta

Thanks a lot for this feature! It allows to build great landing pages apart from the homepage. So it would be nice to have the appropriate metadata that you need for sharing on social media, SEO or Google Discover (the latter apparently became more important than Google search in my country during the last months when it comes to traffic). Are there any plans to provide a meta title / description and the custom meta tags for the big social networks or even make them editable?

8 Me gusta

Any update on being able to include the Discourse header on published pages?

6 Me gusta

Will it ever be possible to render LaTeX in a published page? Would be cool to write math articles.

2 Me gusta

May I ask, Is there a url that can list all the published page for Admin ? So Admin can easily see all the page they published.
Something similar to wordpress ?
If not, It would be great if the url example.com/pub/. list all the page published.

6 Me gusta

Are there any plans to allow rendering of these published pages inside the normal Discourse Ember layout? It seems a shame that you can’t just pull them into the layout like the other app sections. I’ve seen a number of others ask this in this thread but nobody seems to have given a direct answer yet.

All of the other static pages plugins that I’ve seen in my research seem to be also rendering their static content in their own Rails layouts, too. Is this a limitation of the Discourse platform, or just that nobody has coded it in yet?

If there is no hard limitation against rendering the published pages inside the normal app layout (with header), where should I start when it comes to getting this feature moving?

Thank you :smiley:

3 Me gusta

You can alter styling per the original post: Page Publishing

2 Me gusta

Thank you @hellekin. However, this does not address the main point of my reply. I asked if it’s possible to render the published pages within the normal Ember.js app layout (with the logo, search, hamburger nav, and user nav), not how to customize the separate published pages layout.

I want the static content to render within the normal app layout the same way that a category or topic detail page would load. I would like to use of all the existing plugins and theme components that interface with the main Ember app layout.

3 Me gusta

I think the purpose of published pages is to remove the Discourse UI.

Although I agree that it would be great to have some features (e.g., from theme components or plugins), I think linking to topics would work better in your case. Maybe you want to explore styling closed topics instead?

2 Me gusta

Is it possible to have the published page keep the site heading intact or did I miss a trick?

5 Me gusta

Page publishing is really cool–the topics look great as standalone pages. But I haven’t been able to use it like I had hoped:

  1. I thought one cool use would be to set up page publishing as a landing page for the forum–so before users login they get to see a topic I have published and styled to be the page they see. Is that possible?

  2. The original post here mentions you can style the page. Is there a way to add jquery or javascript to the page? (edit: I see that from the earlier discussion there have been requests for being able to add jquery, javascript to the pages but not yet there, at least as of last year–basically, it looks like people have been hoping that they could have a static page, but render with the same customization possibilities of a normal topic–which is what I would appreciate too.)

3 Me gusta

Yes, there is, although it is not immediately obvious.

5 Me gusta

¿Hay una forma preferida de enlazar de vuelta a la publicación original desde la página publicada?

Me encuentro queriendo hacer esto con bastante frecuencia, para animar a los lectores a responder, mientras mantengo el control sobre el estilo de la página publicada de solo lectura. He probado varias formas, incluyendo enlazar al tema de forma destacada o simplemente con un enlace de ‘discutir’.

Quizás una opción para añadir un botón de discusión que permaneciera visible en todo momento (pero que aún pudiera modificarse con CSS) podría funcionar. ¿Alguien ha implementado ya algún truco de CSS de este tipo?

5 Me gusta

Se dividieron 2 publicaciones en un nuevo tema: ¿Puede una página publicada aparecer junto a about/faqs/tos/privacy?

Dependiendo de la naturaleza de la página, dejo un enlace donde sea apropiado. En algunos en la parte superior, como aquí:

En algunos en la parte inferior, como aquí:

Puedes “simular” un botón codificando CSS para una etiqueta específica, como hice para el encabezado de esta categoría:

https://foro.enunionylibertad.com/c/uni2-cordoba/6

Texto:

Ciudadanos con la convicción de que la República Argentina puede, debe, y va a ser un lugar mejor, si trabajamos todos Unidos en pos de la Libertad.
    <mark>&nbsp;&nbsp;&nbsp;[**Afiliación**](https://foro.enunionylibertad.com/t/formulario-de-pre-afiliacion/92)&nbsp;&nbsp;&nbsp;</mark>

(la parte importante son las etiquetas <mark>)

CSS para dichas etiquetas <mark>:

/* Code to CHANGE "mark" tag render to something that looks like a "menu bar" */
mark {
  display: inline-block;
  background-color: #E1E1E1 !important;
  color: black;
  border-radius: 20px !important;
  padding-top: 5px;
  padding-bottom: 5px;
}
3 Me gusta

Una alternativa a la publicación de páginas: otro método es usar CSS para eliminar los elementos no deseados en una publicación de tema normal, al tiempo que se preserva toda la funcionalidad (es decir, scripts de JavaScript en componentes de temas instalados, estilo CSS, etc.).

Las etiquetas en el compositor se pueden usar para aplicar selectivamente formato a una publicación de tema específica.

Por ejemplo, en mi sitio, logro esto pegando el siguiente CSS en el CSS de mi tema en la pestaña Común:

/********************** ELIMINAR COSAS DEL DISEÑO USANDO ETIQUETAS *************** /

.tag-no-header {
    .d-header {
        display: none !important;
    }
    #post_1 nav.post-controls .actions button.edit {
    top: 0px !important;
    }
    .topic-body h1 {
        padding-top: 0 !important;
    }
}

.tag-no-sidebars {
    aside.sidebar {
        display: none !important;
    }
}

.tag-no-category {
    .topic-category {
        display: none !important;
    }
}

.tag-no-timeline {
    .topic-navigation {
        display:none !important;
    }
    .container.posts {
        grid-template-columns: 100% !important;
    }
    .topic-body {
    width: 100% !important;
    }
}

.tag-no-post-links {
    .post-links-container {
        display:none !important;
    }
}

.tag-no-box-shadow {
    .topic-body {
        width: 100% !important;
        border-top: none !important;
        box-shadow: none !important;
        background-color: unset !important;
    }
}

.tag-no-topic-meta-data {
    .topic-meta-data {
        display:none !important;
    }
}

.tag-no-side-margins {
    .wrap {
        max-width: unset !important;
        padding: 0 10px !important;
    }
    .content-wrapper {
        display: block !important;
    }
    #main-outlet-wrapper {
        width: 100% !important;
    }
    .topic-body {
        width: 100% !important;
    }
}

.tag-no-footer-buttons {
    #topic-footer-buttons {
        display: none !important;
    }
}

Luego creo etiquetas que puedo aplicar selectivamente a las publicaciones de temas, coincidiendo con los selectores CSS en el código anterior…

no-header
no-sidebars
no-category
no-timeline
no-post-links
no-box-shadow
no-topic-meta-data
no-side-margins
no-footer-buttons


Así que aquí están las dos versiones diferentes de la misma publicación de tema…

Antes (sin etiquetas aplicadas):

Después (todas las etiquetas aplicadas): - que también puedo incrustar como un iFrame en otras publicaciones de mi sitio :nerd_face::

24 Me gusta

¡Guau! :star_struck:

Ese es un pensamiento innovador muy bueno :smiley:

4 Me gusta

¡Muchas gracias @Richie! ¡Out-of-the-Box es mi mundo entero!

2 Me gusta

Hay un error tipográfico en tu código, un punto y coma doble:

    .topic-body h1 {
        padding-top: 0 !important;
    }

Además,

¿Olvidaste publicar tu imagen? A menos que la versión “Después” de tu página sea solo música :smile:


Jugué un poco con tu código y ¡es simplemente :sparkles: brillante! :sparkles:

Podríamos agregar algunos consejos para usar este truco según tus necesidades.

  • Tus temas podrían cerrarse para evitar que las personas eludan las reglas de CSS y respondan a ellos.

  • Tus temas podrían no aparecer en la lista para no agregar ruido a las listas de temas o aparecer en los resultados de búsqueda.

  • Las etiquetas podrían estar en un grupo de etiquetas invisible para los usuarios habituales para eliminar el ruido en las listas de etiquetas.

  • Podrías ocultar algunos elementos solo para usuarios habituales, pero no para el administrador (como el menú de publicaciones).

Esto me vino rápidamente a la mente, pero supongo que hay otras cosas en las que se podría pensar.

4 Me gusta

Gracias @Canapin :sparkling_heart: Corregí los errores tipográficos del código.

Las categorías y subcategorías también se pueden usar en CSS usando category-

por ejemplo…

.category-books .main-content,
.category-my-great-book .main-content {
    width:100% !important;
}

También estoy usando este truco en mi sitio de forma extensiva, para estilizar contenido y embebidos sobre la marcha dentro del compositor…

Tengo una sección de mi sitio donde documento mis desarrollos (principalmente para que mi yo futuro pueda recordar y encontrar lo que ya he hecho, ¡así no sigo reinventando mi propia rueda!) Pero cualquiera es bienvenido a visitar y/o suscribirse a esa categoría si lo desea…

3 Me gusta