نشر الصفحة

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 إعجابات

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 إعجابات

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

6 إعجابات

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

إعجابَين (2)

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 إعجابات

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 إعجابات

You can alter styling per the original post: Page Publishing

إعجابَين (2)

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.

4 إعجابات

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?

3 إعجابات

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

6 إعجابات

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 إعجابات

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

5 إعجابات

هل هناك طريقة مفضلة للربط مرة أخرى بالمنشور الأصلي من الصفحة المنشورة؟

أجد نفسي أرغب في القيام بذلك كثيرًا، لتشجيع الردود من القراء، مع الحفاظ على التحكم في نمط الصفحة المنشورة للقراءة فقط. لقد جربت عدة طرق، بما في ذلك الربط بالموضوع بشكل بارز أو ببساطة برابط “مناقشة”.

ربما يمكن أن يعمل خيار إضافة زر مناقشة يظل مرئيًا في جميع الأوقات (ولكن لا يزال قابلاً للتعديل باستخدام CSS). هل قام شخص ما بتطبيق خدعة CSS كهذه بالفعل؟

6 إعجابات

تم تقسيم مشاركتين إلى موضوع جديد: هل يمكن أن تظهر صفحة منشورة بجانب about/faqs/tos/privacy؟

اعتمادًا على طبيعة الصفحة، أترك رابطًا حيثما كان مناسبًا. في بعض الأحيان في الأعلى، كما هو الحال هنا:

في بعض الأحيان في الأسفل، كما هو الحال هنا:

يمكنك “محاكاة” زر عن طريق ترميز CSS لعلامة معينة، كما فعلت لرأس هذه الفئة:

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

نص:

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.
    [**Afiliación**](https://foro.enunionylibertad.com/t/formulario-de-pre-afiliacion/92)

(الجزء المهم هو علامات <mark>)

CSS لعلامات <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 إعجابات

بديل لـ Page Publishing - طريقة أخرى هي استخدام CSS لـ إزالة العناصر غير المرغوب فيها في منشور موضوع عادي، مع الحفاظ على جميع الوظائف (أي نصوص JavaScript في مكونات الثيم المثبتة، وتنسيق CSS، وما إلى ذلك)

يمكن استخدام العلامات في المنشئ لتطبيق التنسيق بشكل انتقائي على منشور موضوع معين.

على سبيل المثال، في موقعي، أحقق ذلك عن طريق لصق CSS التالي في CSS الخاص بالثيم في علامة التبويب Common:

/********************** REMOVE THINGS FROM LAYOUT USING TAGS *************** /

.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;
    }
}

ثم أقوم بإنشاء علامات يمكنني تطبيقها بشكل انتقائي على منشورات الموضوع، مطابقة محددات CSS في الكود أعلاه…

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


إذًا إليك الإصداران المختلفان لنفس منشور الموضوع…

قبل (لم يتم تطبيق أي علامات):

بعد (تم تطبيق جميع العلامات) - والتي يمكنني أيضًا تضمينها كـ iFrame في منشورات أخرى على موقعي :nerd_face::

25 إعجابًا

رائع :star_struck:

هذا تفكير رائع خارج الصندوق :smiley:

4 إعجابات

شكرا جزيلا لك @Richie!! Out-of-the-Box هو عالمي بالكامل!

إعجابَين (2)

يوجد خطأ إملائي في الكود الخاص بك، فاصلة منقوطة مزدوجة:

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

أيضًا،

هل نسيت نشر صورتك؟ إلا إذا كانت النسخة “بعد” من صفحتك هي مجرد موسيقى :smile:


لقد عبثت قليلاً بالكود الخاص بك وهذا رائع حقًا! :sparkles: :sparkles:

يمكننا إضافة بعض النصائح لاستخدام هذه الحيلة حسب احتياجاتك.

  • يمكن إغلاق مواضيعك لمنع الأشخاص من التحايل على قواعد CSS والرد عليها.

  • يمكن إلغاء إدراج مواضيعك لتجنب إضافة ضوضاء إلى قوائم المواضيع أو الظهور في نتائج البحث.

  • يمكن أن تكون العلامات في مجموعة علامات غير مرئية للمستخدمين العاديين لإزالة الضوضاء في قوائم العلامات.

  • يمكنك إخفاء بعض العناصر للمستخدمين العاديين فقط وليس للمسؤول (مثل قائمة المشاركات).

هذا ما خطر ببالي بسرعة، لكنني أفترض أن هناك أشياء أخرى يمكن التفكير فيها.

4 إعجابات

شكرا @Canapin :sparkling_heart: لقد قمت بتصحيح الأخطاء الإملائية في الكود.

يمكن أيضًا استخدام الفئات والفئات الفرعية في CSS باستخدام category-

على سبيل المثال…

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

أنا أيضًا أستخدم هذه الحيلة على موقعي بشكل مكثف، لتنسيق المحتوى والتضمينات في الوقت الفعلي داخل المنشئ…

لدي قسم في موقعي أقوم فيه بتوثيق تطوراتي (بشكل أساسي حتى يتمكن ذاتي المستقبلية من تذكر ما قمت به بالفعل والعثور عليه، حتى لا أستمر في إعادة اختراع عجلتي الخاصة!) ولكن أي شخص مرحب به لزيارة أو الاشتراك في هذه الفئة إذا كنت ترغب في ذلك…

3 إعجابات