codedoc
codedoc copied to clipboard
GitHub integration warning?
Created a test repo codedoc having master
as its default branch and configure gh-pages to the gh-pages
branch. After which running:
# local system is archlinux
$codedoc init
populates config.ts
as:
// config.ts
import { configuration } from '@codedoc/core';
import { theme } from './theme';
export const config = /*#__PURE__*/configuration({
theme, // --> add the theme. modify `./theme.ts` for chaning the theme.
page: {
title: {
base: 'Codedoc' // --> the base title of your doc pages
}
},
});
$codedoc check # No issues detected
Since my repo is in github (and gh-pages are already configured) I thought config.ts
should have produced the github
literal. Did I miss something? So I manually added the github integration as:
// config.ts
import { configuration } from '@codedoc/core';
import { theme } from './theme';
export const config = /*#__PURE__*/configuration({
theme, // --> add the theme. modify `./theme.ts` for chaning the theme.
page: {
title: {
base: 'Codedoc' // --> the base title of your doc pages
}
},
dest: {
html: 'dist',
assets: 'dist',
namespace: '/codedoc'
},
misc: {
github: {
user: 'nakednous',
repo: 'codedoc',
action: 'Star',
count: false,
large: true,
standardIcon: false,
}
},
});
However, running codedoc check
produces the following warning:
$codedoc check
# Checking GitHub configuration ...
#
# WARNING::
# Your CODEDOC config indicates GitHub integration, but
# your project folder is not in sync with a GitHub repository.
#
# You can fix this by modifying .codedoc/config.ts
#
# Read https://codedoc.cc/docs/config/misc#github-integration for more information.
#
Is it an issue or is it just my config?
At what URL do you want your site served?
https://nakednous.github.io/codedoc
I added the github yml to the actual repo and it worked as expected. I was wondering about the warning I'm getting.
@nakednous may I ask:
- how did you clone your repo locally (i.e. via https or via ssh)?
- which version of codedoc cli are you using? you can find that out by running
codedoc v
I used https. Have no keys configured, but try to clone with gh repo clone
and the warning message has gone.
# @codedoc/cli version 0.2.6 ...................................... latest: 0.2.6
# @codedoc/core version: 0.2.15
So I just tried to replicate the issue doing the following:
git clone https://github.com/nakednous/codedoc.git # --> cloning via https
cd codedoc # --> going to the cloned folder
codedoc install # --> install codedoc dependencies
codedoc check
And I get no warnings. Can you run this command in the cloned folder where you get the warning and reply the result?
git remote get-url origin
I get:https://github.com/nakednous/codedoc