codedoc icon indicating copy to clipboard operation
codedoc copied to clipboard

GitHub integration warning?

Open nakednous opened this issue 4 years ago • 6 comments

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?

nakednous avatar Oct 11 '20 22:10 nakednous

At what URL do you want your site served?

TysonMN avatar Oct 11 '20 22:10 TysonMN

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 avatar Oct 11 '20 22:10 nakednous

@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

loreanvictor avatar Oct 12 '20 06:10 loreanvictor

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 

nakednous avatar Oct 12 '20 12:10 nakednous

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

loreanvictor avatar Oct 12 '20 12:10 loreanvictor

I get:https://github.com/nakednous/codedoc

nakednous avatar Oct 12 '20 21:10 nakednous