نشر الصفحة

:bookmark: يغطي هذا الدليل كيفية استخدام ميزة نشر الصفحات (Page Publishing) في Discourse. تتيح هذه الميزة لمستخدمي الموظفين (Staff users) تحويل موضوع إلى صفحة ثابتة قائمة بذاتها مع تنسيق مخصص. تشمل الأمثلة صفحات شروط الخدمة وسياسة الخصوصية.

:person_raising_hand: مستوى المستخدم المطلوب: موظف (Staff)

نشر الصفحات الثابتة على Discourse

يتيح نشر الصفحات (Page Publishing) لمستخدمي الموظفين إنشاء صفحات ثابتة قائمة بذاتها من المواضيع. يشبه هذا الإجراء إنشاء صفحات شروط الخدمة أو سياسة الخصوصية.

الملخص

ستغطي هذه الوثائق:

  • تمكين نشر الصفحات
  • نشر موضوع كصفحة
  • إلغاء نشر موضوع
  • المشكلات والحلول الشائعة
  • الأسئلة الشائعة
  • موارد إضافية

تمكين نشر الصفحات

  1. انتقل إلى Admin (المسؤول) > Settings (الإعدادات).
  2. قم بتفعيل إعداد enable page publishing (تمكين نشر الصفحات).
    Enable Page Publishing

تمكين نشر الصفحات عندما يكون تسجيل الدخول مطلوبًا

للسماح برؤية الصفحات المنشورة حتى عندما لا يكون المستخدم مسجلاً للدخول:

  1. قم بتفعيل الإعداد show_published_pages_login_required (إظهار الصفحات المنشورة يتطلب تسجيل الدخول) في Admin (المسؤول) > Settings (الإعدادات).
    Show Published Pages

نشر موضوع

  1. انتقل إلى المنشور الأول في موضوع عام وحدد أيقونة النقاط الثلاث (...).
    Ellipsis Menu

  2. حدد أيقونة المفتاح (Wrench icon).
    Wrench Icon

  3. اختر خيار “Page Publishing” (نشر الصفحات).

  4. سيظهر مربع حوار، مما يسمح لك بتأكيد الرابط المختصر (slug) (والذي يمكن ملؤه مسبقًا من عنوان المنشور) ومعاينة عنوان URL للصفحة المنشورة.

:warning: للسماح بنشر الصفحات، من الضروري إلغاء تفعيل إعدادات الموقع الخاصة بـ التحميلات الآمنة (secure upload).

:information_source: بالنسبة للمواقع المستضافة، يقتصر التحميل الآمن على خطة المؤسسات (Enterprise plan).

الموضوع المنشور

الصفحة المنشورة

إلغاء نشر موضوع

  1. حدد Publishing Settings (إعدادات النشر) أسفل الإشعار.

  2. انقر على Unpublish (إلغاء النشر)

  3. يتم إلغاء نشر الصفحة.

المشكلات والحلول الشائعة

عدم القدرة على رؤية الصفحات المنشورة عند تسجيل الخروج

تأكد من تفعيل الإعداد show_published_pages_login_required في Admin (المسؤول) > Settings (الإعدادات).

إضافة رأس Discourse إلى الصفحات المنشورة

في الوقت الحالي، من المفترض أن تكون الصفحات الثابتة بسيطة ولا تتضمن رأس وتذييل Discourse المعتادين.

الأسئلة الشائعة

هل يمكنني جعل صفحة الأسئلة الشائعة (FAQ) أو صفحة “حول” عامة؟

يمكنك إنشاء موضوع جديد بالمحتوى المطلوب ونشره كصفحة. قم بتغيير الروابط في إعدادات الموقع لتشير إلى هذه الصفحات الجديدة.

كيف يمكنني تخصيص مظهر الصفحة المنشورة؟

استخدم هيكل مستند HTML ومحددات CSS المقابلة لتطبيق أنماط مخصصة ضمن Admin (المسؤول) > Customize (تخصيص) > Themes (السمات) > CSS.

موارد إضافية

118 إعجابًا
Best landing page solution
ProCourse Static Pages
Using Discourse as a News Blog and Forum - Any Known Good Examples?
How to add a new page into the community? (Login isolated page)
Blog Post Styling
Is anyone here using their Discourse instance as their entire website?
How do I redirect urls or create new ones?
Discourse + CMS, which one?
Is there an upper limit to how many pages can be published?
Host HTML page on Discourse install
Integrating webpage to current forum
Open (anon) interaction with a forum
Shared Drafts: Allow staff to collaborate on posts before publishing
Is there any way to listen User login event using Theme component
How to share only few posts to public as links?
Open (anon) interaction with a forum
Create a "Docs" page like discource meta's
Invite people to reply to a topic without them needing to create an account
Allow anonymous users to view a topic?
What's the usage of "show published pages login required" setting?
How to add contact us page?
Embed my Discourse Forum as IFrame
Is there any way to restrict posting in a topic to members of a group, but allow all users to read the topic?
Order posts by Title
Edit Code
Published page not visible?
Inline Tooltips
Making the About and FAQ visible to anon
Allow published pages to be visible to anon
Customize login page
7 myths why a blog isn't needed in the discourse core
Landing Page
Customizing FAQs and Guidelines
ProCourse Static Pages
Can I use secure media and page publishing simultaneously in Discourse?
Publishing - how deep/good is fine-grained permisson control?
Publish Direct Messages
500 character ‘Reject Reason’ is too small a limit
How do I create a blank page within Discourse
How-to use Discourse for managing a collaborative newsletter?
Customize Login pop-up box?
Building a custom html page in discourse
Page for not-logged in users with a single topic displayed
Duplicate Terms of Service/Privacy Policy
Paid Groups
Help custom page?
Should Discourse make an effort to become the next best "CMS"
Is It Possible to Create Custom Pages in Discourse?
How to Enable Terms of Service and Privacy Policy Pages in Discourse?
Is It Possible to Create Custom Pages in Discourse?
Blank Pages Related Help
How do root level links work?
Creating custom pages like "About" and "FAQ"
Multi-factor authentication enforcement lock in without help
Can you create a custom landing page?
Static pages for things like guidelines?
Create a new text page option?
Change topic visibility in an admin category to public
Create a custom page with theme cli?
DiscoTOC - automatic table of contents
Adding a static web page
[Urgent] privacy policy page
How to make a website with Discourse
Generate static file in discourse
Discourse for Teams is here!
Category Previews
Public Static pages and Private Forums - possible?
Filter view for muted categories
Category Previews
How to hide a single topic from showing up in "latest"?
ProCourse Static Pages
Control the visibility of /faq and /about
[Question/Request] Featured image url for post
Custom Homepage for Groups
Embedding private discussions on a wordpress site
Table of Contents not working on Published Pages

I still need to try this out first hand so the following may not be grounded in reality, but:

It strikes me that this permission model sets up a scenario where you always see two copies of the pages’ content – one in the relevant Discourse category, and one in the published pages themselves. This of course seems duplicative if you’re wanting to publish pages for the general population that is similar to, or identical to, your Discourse user base.

OTOH, if pages had the “world readable” flag available, you could then restrict who can see/edit them to a small group, and the only place the content would be available to other Discourse users would be in the published links themselves.

(I’m thinking of a use case of a “documentation site” here.)

Otherwise, I’m pretty excited to test things out!

8 إعجابات

Awesome stuff, and thanks again for listening to your users. I love the ‘lets make this better for us all’ vibe that Discourse has! We’ll make heavy use of this.

When discussing one use (patching up an install that went a bit awry), another user pointed out a remaining bit of icing that could do with going on the cake:

Hey, is there any way to include the ability to make /faq and /about public as well, as they are currently hidden in Login Required sites. We can of course use the existing functionality that you’ve just released for /faq by making our own, changing the link in settings, and explicitly linking to it. However, this is not pretty and the existing navigation to it remains hidden. We can’t do that at all for /about of course.

9 إعجابات

Something that would go nice with this feature is to make publications onebox-compatible such that people could easily share the content.

15 إعجابًا

Please excuse my ignorance, as I am very much a beginner in the HTML/CSS space… however, how would we go about applying our theme colour choices to published pages. At its simplest, I’d like to use the dark background/white text to give the published pages the same darkmode experience as accessing our forums.

Is this already in the product, or do I need to play with HTML/CSS? If the latter, could anyone give me some pointers in the right direction? Thanks!

4 إعجابات

Can you make this a separate feature request please? This is not related to page publishing, as in I wouldn’t have to change anything related to page publishing to make it possible. I do agree it would be better if all these “static” pages could have more or less the same behaviour, but there are multiple solutions here (do nothing? add site settings? migrate these to page publishing?), so we might want to have a dedicated topic for this.

8 إعجابات

GTM not loaded on published pages? Would be nice.

إعجابَين (2)

Hmm that is a really good point.

Just trying to think of a solution here… would it work if type="text/javascript" and type="text/discourse-plugin" were treated differently? The API needs the latter, right?

5 إعجابات

Yes I think we already support having a text/javascript in the theme fields, so there are certainly solutions in this area.

7 إعجابات

That would be great.

إعجاب واحد (1)

So it’s currently impossible to have responsive published pages, and this site particularly wants

  1. images made available when sharing to public media, and
  2. responsive/resizing images displayed, especially on mobile–oh, mobile could just resize the image with CSS–that should work, right?
6 إعجابات

+1 for having the Discourse header in published pages. I’m missing my website logo, custom header links and beloved hamburger menu :slight_smile:

Another oddity: in posts, my lightboxed images open in a nice popup, whereas in published pages, they open in a new tab…

7 إعجابات

I think what’s needed is a set of theme components that add such. The last client I had to use this wanted the topic creator removed. I think it’s hard to guess what will meet people’s needs for this!

6 إعجابات

Are there currently any ongoing efforts for adding “simple” (non-API) Javascript support to published pages? Or should we forget about this near- to mid-term ?

9 إعجابات

هل يمكنني عرض JSON خارجي غير Discourse على هذه الصفحة؟ لأننا لا نستطيع استخدام كود PHP هنا، وDiscourse يحذف معظم HTML، لذا لا أعرف كيفية القيام بذلك.

إعجابَين (2)

أواجه مشكلة في صفحة منشورة: زر نسخ محتوى كتلة الكود غير مرئي في الصفحة المنشورة. لقطة شاشة: Screenshot by Lightshot. أحرّك الفأرة فوق الكتلة، لكن الزر لا يظهر. عند تسجيل الدخول، يعمل كل شيء بشكل طبيعي.

هل يمكن لأي شخص تكرار المشكلة؟ هل هناك حل؟

إعجابَين (2)

شكرًا لك @riking!

يبدو بالفعل أن text/javascript “العادي” يتم تنفيذه في الصفحات المنشورة عندما يكون موجودًا في header أو footer لمكون من مكونات المظهر.

8 إعجابات

ها! يبدو إذن أن هناك طريقة غير رسمية لجعل بعض مكونات السمات تعمل مع نشر الصفحات.

أنا أبحث في إضافة بعض الترويسة/التذييل إلى الصفحات المنشورة، ويبدو أن مكونات السمة هي المسار الأنسب. لكن يبدو سيئًا المضي قدمًا وتنفيذ شيء قد ينكسر محتملًا في المستقبل القريب.

@riking، يبدو أن نوع text/javascript في header أو footer الذي يعمل على الصفحات المنشورة كان غير مقصود. هل سيتم إصلاحه أم استخدامه لتوسيع الصفحات المنشورة؟

ذكر @syl، مؤلف DiscPage، إمكانية إعادة تنفيذ إضافة DiscPage باستخدام وظائف نشر الصفحات. هل لا يزال هذا في ذهنك، @syl؟ ما الذي تعتقد أنه المسار الأقل مقاومة لدمج كلا الوظيفتين، @riking؟

7 إعجابات

لسوء الحظ، لا تفي ميزة “النشر بالصفحات” باحتياجاتي. لكي أتمكن من استخدامها، أحتاج إلى أن تكون الصفحات المنشورة:

  1. معروضة ضمن تخطيط Discourse العادي، أي مع رأس Discourse القياسي (تمامًا مثل شروط الخدمة و سياسة الخصوصية)، و
  2. مُعطَّلة مثل المواضيع العادية (المُزخرفة)، أي مع دعم bbcode والإضافات.
15 إعجابًا

في غضون ذلك، استخدمت أداة التخصيص الافتراضية الخاصة بـ Discourse:

  1. حدد العنصر المضاف، على سبيل المثال، باستخدام فئة CSS باسم published-page-footer-links.
  2. قم بتخصيص CSS لإخفاء هذا العنصر افتراضيًا وإظهاره فقط للصفحات المنشورة.
  3. أضف العنصر في مساحة Footer.

2. في CSS، أضف:

/* إظهار روابط التذييل فقط في الصفحات المنشورة */
.published-page-footer-links { display: none; }
.published-page .published-page-footer-links { display: block;}

3. في Footer، أضف:

<nav class="published-page-footer-links">
مرحبًا! هذا هو التذييل للصفحات المنشورة!
</nav>
8 إعجابات