GithubHelp home page GithubHelp logo

Comments (14)

LukeTowers avatar LukeTowers commented on June 7, 2024

The documentation available at https://octobercms.com/docs is literally just mirrored into the content/docs directory of the OctoberCMS website AFAIK. Hopefully that helps, albeit a bit late.

from docs.

chrisvidal avatar chrisvidal commented on June 7, 2024

trying to replicate the same documentation system but I cant get it right.
I see a file config/toc-docs.yaml, how and where is used please ?

from docs.

LukeTowers avatar LukeTowers commented on June 7, 2024

It's used by a simple PHP script on a CMS page to process & render the Table of Contents. I don't have access to it at the moment; but it shouldn't be too difficult to implement yourself.

from docs.

chrisvidal avatar chrisvidal commented on June 7, 2024

Thanks Luke. Yes i will figured this out with using the Yaml Parser class.
Last question is about how do you generate the pages themselves?
I am thinking to generate them instead of creating them manually and forget some.

from docs.

LukeTowers avatar LukeTowers commented on June 7, 2024

What do you mean how do you generate them? They're pulled in from the repo via git and added to the content directory

from docs.

chrisvidal avatar chrisvidal commented on June 7, 2024

the repo is meant to be in placed in the content folder right ?
it is purely content and it is not page (i dont see any page title, no page url, ) so I am guessing that there are pages holding that content somewhere.
Am I missing something ?
I tried to put those .md files in the content folder and tried to access them from an url, but no luck so far.

from docs.

LukeTowers avatar LukeTowers commented on June 7, 2024

You'd use the TOC to get that information, and you would be using the content files as a static database rendering them as required on a CMS page through the |md filter

from docs.

chrisvidal avatar chrisvidal commented on June 7, 2024

What? i dont get you here.
to display the url cms/theme/installation you need a page with this url defined that will contains the tag {% content 'docs/setup/installation ' %}
to display the url cms/theme/configuration you need another page with this url defined that will contains the tag {% content 'docs/setup/configuration ' %}

and so forth. right ?

or is there a way to have only one page used for all ?
I am confused here

from docs.

LukeTowers avatar LukeTowers commented on June 7, 2024

@chrisvidal use URL parameters:

url="/docs/:path?*"
==
{% content 'docs/' ~ this.param.path | md %}

from docs.

chrisvidal avatar chrisvidal commented on June 7, 2024

Holy Cow !
I didnt think about this at all. It makes sense.
Thanks Luke

from docs.

LukeTowers avatar LukeTowers commented on June 7, 2024

No problem

from docs.

chrisvidal avatar chrisvidal commented on June 7, 2024

in my case this works:

{% set docFile = 'docs/' ~ this.param['path?']|replace({'/' : '-'}) ~ '.md' %}
{% content docFile %}

from docs.

chrisvidal avatar chrisvidal commented on June 7, 2024

we cant use {% partial %} in content file ?

from docs.

LukeTowers avatar LukeTowers commented on June 7, 2024

Content files are fairly limited in what they can do, as they are just content. If you want partials, use partials to hold partials

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.