Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mkdocs.yml template for mkdocs 2.5+ #163

Closed
wants to merge 2 commits into from

Conversation

ejegg
Copy link
Contributor

@ejegg ejegg commented Oct 8, 2019

The markdown_extensions syntax has changed, but the current publishing infrastructure doesn't support the new stuff yet. Splitting this into a separate PR

theme: material

pages:
- Home: index.md
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ejegg

Would it make sense to point this at the README.md file? There's a lot of overlap between the index.md and README.md templates (wrt general overview and requirements).

https://github.com/totten/civix/blob/master/src/CRM/CivixBundle/Resources/views/Code/readme.md.php

There are a few differences wrt to install-instructions, usage, known issues, and future plans - however, I think these differences are more happenstance than essence. Those topics all seem equally plausible as "quick intro material".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make sense! At this point, I'm just trying to be consistent with the instructions at https://docs.civicrm.org/dev/en/latest/documentation/extensions/ .
In the README section on that page, it suggests that you might want to just make a symlink from README.md to docs/index.md. So I guess I'd want to leave this yml file as-is in any case, just start with a symlink.

Copy link

@homotechsual homotechsual Oct 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without a file called "index.md" you won't get an autoloaded page when hitting the book. There needs to be at least one file called "index" at least at the moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MikeyMJCO! over in PR #162 (the version that should be mergeable before the docs infrastructure upgrade) I left index.md in place and just added the explanatory comment suggested below.

@@ -0,0 +1,21 @@
site_name: <?php echo "$fullName\n"; ?>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe leave a trail pointing to some information about what how to use mkdocs? e.g.

Suggested change
site_name: <?php echo "$fullName\n"; ?>
## Use mkdocs to generate a manual for this extension. For more information about mkdocs,
## see https://docs.civicrm.org/dev/en/latest/documentation/
site_name: <?php echo "$fullName\n"; ?>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I've updated it in PR #162, which just has the first commit introducing these files with the old mkdocs.yml extensions syntax. I'll rebase this one once that one gets merged.

@ejegg ejegg changed the title Update mkdocs.yml template for mkdocs 2.5+ (Do Not Merge till publishing can handle new mkdocs) Update mkdocs.yml template for mkdocs 2.5+ Oct 18, 2019
@homotechsual
Copy link

This can be merged - current docs infra supports all of this.

@eileenmcnaughton
Copy link
Contributor

@totten see ^^ we should merge

@ejegg ejegg changed the title (Do Not Merge till publishing can handle new mkdocs) Update mkdocs.yml template for mkdocs 2.5+ Update mkdocs.yml template for mkdocs 2.5+ May 1, 2021
ejegg added 2 commits April 30, 2021 21:13
Just generates mkdocs.yml and docs/index.md with a couple of Template
builders in the main InitCommand for now. Alternatively, could create
a Docs builder and/or command. Uses the old markdown_extensions syntax
because that's all the publishing infrastructure supports now.

Fixes totten#161
Mikey says this'll have to wait for an update to the publishing
infrastructure.
@ejegg
Copy link
Contributor Author

ejegg commented May 1, 2021

OK, this is rebased + title changed to remove DNM warning

Copy link

@homotechsual homotechsual left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs to add the theme and category to the template.

repo_url: https://lab.civicrm.org/extensions/FIXME
theme: material

pages:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pages:
pages:

The pages key is deprecated. It won't work. This should use nav:

@homotechsual
Copy link

@homotechsual
Copy link

The file should have the site_name, site_description, theme:, nav:, markdown_extensions: and plugins: keys.

@ejegg
Copy link
Contributor Author

ejegg commented May 1, 2021

Oh hey @MikeyMJCO, since PR #162 with the older version never got merged, there's no need to do this in two commit. I've just updated #162 with the new syntax and the extra keys from that example. Let's merge that one instead of this one.

@ejegg ejegg closed this May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants