dotnet / docfx

Static site generator for .NET API documentation.
https://dotnet.github.io/docfx/
MIT License
4.08k stars 865 forks source link

Forum integration with Docfx #2893

Closed cbenea closed 6 years ago

cbenea commented 6 years ago

DocFX Version Used: 2.21.1.1

Template used: custom template

Steps to Reproduce:

Integrate a Question2Answer forum (http://www.question2answer.org/) with Docfx. This forum uses PHP and MySQL db running on Apache webserver.

Expected Behavior: Having forum running on Docfx

Do you know if it is possible, are there any additional plugins required or can you help me with the necessary steps to install it?

In case this is not applicable, do you have another forum example that would work (excluding Disqus)?

Thank you!

superyyrrzz commented 6 years ago

Can you describe your scenario with more details?

In my understanding, you want to have some static pages generated by DocFX, and some dynamic pages backed by PHP, in the same site. I think you can customized both the nav bar to make them look unified.

It's supported to customize DocFX generated pages: http://dotnet.github.io/docfx/tutorial/howto_create_custom_template.html

cbenea commented 6 years ago

Hi, Thank you for answering. Practically I installed all related tools (Apache, PHP, MySQl) for the following forum: http://www.question2answer.org/qa/ (see here: http://docs.question2answer.org/install/). This forum is independent, but I need to fully integrate it on my docfx site (example: http://mysite/forum.html) instead of using options like embed with iframe or other. The main purpose is to keep it on the same URL as for docfx site. Is that possible and how can I do it, please? Thanks!

herohua commented 6 years ago

@cbenea

Is it possible to put the forum page in same folder as DocFX generated pages?

cbenea commented 6 years ago

Hi @superyyrrzz and @herohua

My main question is: can I replace the Apache with docfx? • In the conf folder of Apache, I have a httpd.conf file where I’m mentioning:

Example: _PHP7.2.6 module LoadModule php7_module "C:/Tools/forumQA/php-7.2.6-Win32-VC15-x64/php7apache24.dll" AddType application/x-httpd-php .php PHPIniDir "C:/Tools/forumQA/php-7.2.6-Win32-VC15-x64"

Example: DocumentRoot "c:/Tools/forumQA/httpd-2.4.33-win64-VC15/Apache24/htdocs" <Directory "c:/Tools/forumQA/httpd-2.4.33-win64-VC15/Apache24/htdocs">

• In the forum folder I have an index.php that represents the main page of the forum and that is getting triggered by Apache server…

Is there a way to configure above steps in docfx in order to replace apache functionality?

Thank you very much!

herohua commented 6 years ago

@cbenea ,

IMO, apache is used to host the forum pages and server side logic (wrapped in DLLs). DocFX is not designed to use as a host, rather it is used to generate the static content pages you can host anywhere you like.

So in your scenario, one possible solution I can think of is to still use apache as the host, but also put DocFX-generated static pages on the server. Makes sense?